On my WordPress blog I'm using colorbox to show images in bigger sizes inside a lightbox. But I do not want to show every and each image inside a lightbox, so I thought of a way to exclude selected images from opening in the lightbox - which is simply by assigning them a class manually.
WordPress does not assign classes to anchor links wrapped around an image out of the box, so I do exactly that here and then I tell jQuery to execute colorbox when an anchor tag contains the class "imageLink".
Now I'm looking for a way to say on the first line select ALL anchor links wrapped around an image IF IT DOES NOT contain the class "no_colorbox".
That way colorbox would execute only on those images with anchor links wrapped around which do not have the class "no_colorbox" manually added by me.
Since I'm not a JavaScript coder I have as usually problems with the correct syntax and would appreciate suggestions for the right syntax.
I've added a custom arrow to the Superfish sub menu, and the problem that I'm experiencing right now is that it gets animated together with the Superfish menu and only shows up a tad bit too late and does not look smooth.
I'd like to smoothen it up a bit by adding my own animation to the arrow image.
Simply hover over CONTACT, then you'll see the sub menu. As you can see the arrow shows up with a delay.
Now I'd like to make it slide up smoothly and I tried the following:
jQuery('ul.sf-menu li ul').parent().hover(
function() {
jQuery('.arrow img').slideUp('slow');
}
);
But now the arrow does not show up at all.
Any ideas how I can achieve this goal of making the arrow slide up?
If there is no good way to do this is there any way to exclude the arrow from the sub menu animation so it shows up immediately? Does jQuery have a command like ".no-animation()" or something along the lines?
I've implemented a jQuery navigation with sub menus into my Wordpress theme. And so far it's working fine the only problem I have with it is that there is a blinking effect as soon as you hover over the menu items and I have no clue where it comes from or why this blinking is there to begin with.
You can see a demonstration of it on my blog here. (Simply hover over the navi item CONTACT).
I've used the jQuery plugin Superfish for the navigation, if some if you may not know it here is the code for the plugin: (I hope I'm not violating any rules by posting the code here.)
I'd appreciate suggestions where the blinking stems from, so I can get rid of it.
var sf = $.fn.superfish, c = sf.c, $arrow = $(['<span class="',c.arrowClass,'"></span>'].join('')), over = function(){ var $$ = $(this), menu = getMenu($$); clearTimeout(menu.sfTimer); $$.showSuperfishUl().siblings().hideSuperfishUl(); }, out = function(){ var $$ = $(this), menu = getMenu($$), o = sf.op; clearTimeout(menu.sfTimer); menu.sfTimer=setTimeout(function(){ o.retainPath=($.inArray($$[0],o.$path)>-1); $$.hideSuperfishUl(); if (o.$path.length && $$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);} },o.delay); }, getMenu = function($menu){ var menu = $menu.parents(['ul.',c.menuClass,':first'].join(''))[0]; sf.op = sf.o[menu.serial]; return menu; }, addArrow = function($a){ $a.addClass(c.anchorClass).append($arrow.clone()); };
return this.each(function() { var s = this.serial = sf.o.length; var o = $.extend({},sf.defaults,op); o.$path = $('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){ $(this).addClass([o.hoverClass,c.bcClass].join(' ')) .filter('li:has(ul)').removeClass(o.pathClass); }); sf.o[s] = sf.op = o;