Before you ask please READ THIS

Open in New Tab or Page on Work List Grid Items

in Rife Posts: 37
Hi

What can I do so that the items in Work List "Grid" can open in new window or tab when click?

Cheers
JasonS

Comments

  • AirAir
    Posts: 10,970
    Hey :-)

    I don't think I have a solution for you in this case. If you really need it I would recommend doing it by custom JavaScript.

    Why do you need it? Aren't you linking to items on the same page?

    With kind regards.
  • Posts: 37
    Hey Air,

    Yes. Because client originally wanted a "POP UP" for those items but it cannot be done now as it do not support elementor build page as per our previous conversation So they want it to open in a new tab or page instead.

    Java script may be out of my league so guess I just have to convince client to live with this for now.

    Thanks anyway.

    :)
  • AirAir
    Posts: 10,970
    Hey :-)

    Do this:
    1. Install this plugin https://wordpress.org/plugins/custom-css-and-javascript/
    2. In Appearance -> Custom JavaScript add below code:
    (function ($) {
    	'use strict';
        $(document).ready(function () {
    		//design opening in new tab
            $('.works-grid-container').on('click', 'a', function (e) {
                window.open($(this).attr('href'), '_blank');
                e.preventDefault();
            });
        });
    })(jQuery);
    It will affect all works girds. If you need it to be more specific - I will help.

    With kind regards.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!