We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40357
    • 8 Posts
    Hello,

    I have installed packages Gallery and sekFancyBox and constructed a gallery from those components.
    Images from the Gallery are outputted as unordered list items.

    -
    What I want
    To add more images, displayed none, but grouped with thumbnailHelper.

    E.g
    http://joetremlindesigns.co.uk/advertising.php - If clicked on 'Friji Wild West' image, another image appears in the thumbnail below the main image. This other image is not displayed within the unordered list.

    -
    sekFancyBox thumbnailHelper is working.
    -

    Can anyone help me out here? [ed. note: andrewn12 last edited this post 14 years, 3 months ago.]
      • 40357
      • 8 Posts
      I have this JQuery to check whether the titles of the unordered list items are the same, and if so to display none.
      (It doesn't work but I'm using it as an explanation to what I want to happen)

      $('.main ul li h3').each(function(){
      
      	var titles = $(this).text(); 
      	var titlesArray = jQuery.makeArray(titles);
      	
      	if (jQuery.unique(titlesArray)){ 
      		$('.main ul li').show(); 
      	}
      	else $('.main ul li').hide();
      	
      });
      [ed. note: andrewn12 last edited this post 14 years, 3 months ago.]
        • 40357
        • 8 Posts
        Solved by using

        var foundValues = [];
        
        $('.main ul li h3').each(function()
        {
          if($.inArray($(this).text(), foundValues) !== -1)
          {
            $(this).parent().hide();
          }
          else
          {
            foundValues.push($(this).text());
          }
        });
        
        });