• Hello,
    I hope someone can help me on this. I bought a plugin called “Isotope Gallery WordPress Plugin”

    http://codecanyon.net/item/isotope-gallery-wordpress-plugin/4699060

    I have activated the plugin and it works fine. What I’m trying to do is add more options to the isotope but adding the code in my footer.php instead of hacking the plugin.

    That way I can control the options for animations, layout etc from my footer.php, does anyone have an idea how I can target the plugin from my footer.php.

    At the moment the trigger for the plugin is:

    function filterIsotopeItems(index){
             var selector = "."+isotopeMenu[index].categoryID;
             (selector==".*")?selector="*":null;
    
             rx_gallery_ui.find('.isotopeContainer').isotope({
                   layoutMode : 'masonry',
                   filter: selector,
                   animationOptions: {
                       duration: 750,
                       easing: 'linear',
                       queue: false
                  }});
        }

    This is in the plugins js. I’m trying to implement this code I got off online with the code above to make my gallery responsive.

    var $container = $('.isotopeContainer'),
    		colWidth = function () {
    			var w = $container.width(),
    				columnNum = 1,
    				columnWidth = 0;
    			if (w > 1200) {
    				columnNum  = 4;
    			} else if (w > 900) {
    				columnNum  = 3;
    			} else if (w > 600) {
    				columnNum  = 3;
    			} else if (w > 380) {
    				columnNum  = 2;
    			}
    			columnWidth = Math.floor(w/columnNum);
    			$container.find('.isotopeItem').each(function() {
    				var $item = $(this),
    					multiplier_w = $item.attr('class').match(/item-w(\d)/),
    					multiplier_h = $item.attr('class').match(/item-h(\d)/),
    					width = multiplier_w ? columnWidth*multiplier_w[1]-4 : columnWidth-4,
    					height = multiplier_h ? columnWidth*multiplier_h[1]*0.5-4 : columnWidth*0.5-4;
    				$item.css({
    					width: width,
    					height: height
    				});
    			});
    			return columnWidth;
    		},
    	isotope = function () {
    			$container.isotope({
    		layoutMode : 'masonry',
    		resizable: false,
    		itemSelector: '.isotopeItem',
    		animationOptions: {
    			duration: 750,
    			easing: 'linear',
    			queue: false
       },
       masonry: {
       columnWidth: colWidth()
       //gutterWidth: 10
     }
    			});
    		};
    	isotope();
    	$(window).smartresize(isotope);
    }(jQuery));

    I mean if anyone can point me in the direction of how to target a plugin from footer.php or header.php would be really awesome.

    Thanks

The topic ‘Isotope Gallery WordPress plugin’ is closed to new replies.