You are here:  » Show less/more of Brand ist

Show less/more of Brand ist

Submitted by nanaz on Wed, 2016-09-21 09:53 in

Hi David,

Because the Brand list got very long on my last site, I hide part of it with a jQuery Show less/Show more, so you only see the first 5 brands and by clicking the rest of the list is shown. This script works with a div and hides by height, so I can put this div around it in the WP PT settings and don't have to interfere with the SQL query for the brand list.
{link saved} (Left sidebar)

Now I'm working on a new site where I use some other plugins that create a jQuery conflict with this script. Therefore I have to use a different script that gives the same result. The problem with this new script is the placing of the Less/More shortcode.

I want to hide everything after the 5th brand, so the beginning of the code has to be placed one time after the 5th record (if it exists), and has to be closed after the query has ended (if 5th record exists).

I hope you can help me!

Cheers, Marlies

Submitted by support on Wed, 2016-09-21 15:09

Hello Marlies,

You could try creating a private jQuery.noConflict() instance - before your less / more code add the following line:

  var pto_jQuery = jQuery.noConflict();

And then in your less / more JavaScript, instead of using




Hope this helps!


Submitted by nanaz on Wed, 2016-09-21 16:30

Hi David,

You're the best, it works! I'm no jQuery expert, so I really didn't know where to start. Thank you again for your amazing support!

Cheers, Marlies