Hi,
I'm very new to JQuery (and Javascript) for that matter and would very much appreciate some help.
What I want to do probably seems very trivial, but it's proving pretty confusing with me.
I have a Javascript file in which I'll be keeping various selector scripts originating from different plugins. I understand that '$(document).ready(function()' is the correct way to start off all scripts.
At the moment, I have the this:-
I am having issues with integrating '$("#foo .submit").throbber("click", {image: "/images/throbber.gif"});' into this file. Everytime I try and load the file, it says that it isn't a function - does that mean every statement like this needs to be put into it's own function? If this is correct, could someone please show me how I would do this?Code:$(document).ready(function() { var showText='more info'; var hideText='close'; var is_visible = false; $('.toggle').prev().append('<a href="#" class="toggle-link">'+showText+'</a>'); $('.toggle').hide(); $('a.toggle-link').click(function() { is_visible = !is_visible; $(this).html( (!is_visible) ? showText : hideText); $(this).toggleClass('close'); $(this).parent().next('.toggle').toggle('fast'); return false; }); $("#foo .submit").throbber("click", {image: "/images/throbber.gif"}); });
Thanks for your help in advance
Ben




Bookmarks