Select last half of list and apply css

After doing some research I have realised that it is impossible to select the last half of a dynamic list with pure CSS.

I got this from another stack overflow, but I just added the first and last lines for wordpress.

Read More
jQuery(function ($) {
var yourList = $(".supercarousel div");
yourList = yourList.slice(0, Math.floor(yourList.length/2));
});

I’m not very good with jQuery and what I would like to do is hide the last half of the list either with display:none or some other method.

For some reason the carousel I’m using duplicates the images but I’m really happy with the carousel other then that.

Related posts

Leave a Reply

1 comment