WordPress.org

Ready to get started?Download WordPress

Forums

Easing Slider "Lite"
[resolved] jQuery not works (3 posts)

  1. shellgarden
    Member
    Posted 1 year ago #

    Hi,
    If Easing Slider is 2.0 updated, jQuery of my site has Not Working.
    Is there any solution?

    $(function() {
    	$('#nav .pointer').css({
    		width: $('#nav .current').outerWidth(),
    		left: $('#nav .current').position().left
    	});
    	$('#nav a').mouseover(function(){
    		$('#nav .pointer').stop().animate({
    			width: $(this).outerWidth(),
    			left: $(this).position().left}
    		,'fast');
    	});
    });

    http://wordpress.org/extend/plugins/easing-slider/

  2. MatthewRuddy
    Member
    Plugin Author

    Posted 1 year ago #

    Hey @shellgarden, this is because you're not using jQuery in no conflict mode. This is very important when writing jQuery with WordPress. It's a simple fix. Change the code to this.

    jQuery(function($) {
    	$('#nav .pointer').css({
    		width: $('#nav .current').outerWidth(),
    		left: $('#nav .current').position().left
    	});
    	$('#nav a').mouseover(function(){
    		$('#nav .pointer').stop().animate({
    			width: $(this).outerWidth(),
    			left: $(this).position().left}
    		,'fast');
    	});
    });

    There is lots of information on using jQuery with WordPress. Have a look at some of the Google Search results found below :)

    Using jQuery in WordPress

  3. shellgarden
    Member
    Posted 1 year ago #

    oh...It was an elementary mistake.
    Thank you.!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic