Home > is not > is not a function error

Is Not A Function Error

Contents

here for a quick overview of the site Help Center Detailed answers to any questions you might $ is not a function wordpress have Meta Discuss the workings and policies of this site About

Jquery $ Is Not A Function Wordpress

Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads is not a function javascript with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million

$ Is Not A Defined

programmers, just like you, helping each other. Join them; it only takes a minute: Sign up jquery - is not a function error up vote 22 down vote favorite 8 Here is my code: (function($){ $.fn.pluginbutton = function (options) { myoptions = $.extend({ left: true }); return this.each(function () { var focus = false; if (focus $ is not a function drupal === false) { this.hover(function () { this.animate({ backgroundPosition: "0 -30px" }, { duration: 0 }); this.removeClass('VBfocus').addClass('VBHover'); }, function () { this.animate({ backgroundPosition: "0 0" }, { duration: 0 }); this.removeClass('VBfocus').removeClass('VBHover'); }); } this.mousedown(function () { focus = true this.animate({ backgroundPosition: "0 30px" }, { duration: 0 }); this.addClass('VBfocus').removeClass('VBHover'); }, function () { focus = false; this.animate({ backgroundPosition: "0 0" }, { duration: 0 }); this.removeClass('VBfocus').addClass('VBHover'); }); }); } }); $(document).ready(function () { $('.smallTabsHeader a').pluginbutton(); }); It gives me an error. What's wrong? jquery function share|improve this question edited May 5 at 17:40 Toby Speight 6,17281738 asked May 24 '11 at 11:42 Phil Jackson 4,2201472116 1 What and where is the exact error? –Felix Kling May 24 '11 at 11:46 add a comment| 5 Answers 5 active oldest votes up vote 42 down vote accepted This problem is "best" solved by using an anonymous function to pass-in the jQuery object thusly: The Anonymous Function Looks Like:

 

© Copyright 2019|winbytes.org.