How to call a function inside a function in Jquery?
I am using jQuery.SerialScroll so I can have a slider. In the code it has a function that looks like this:
var j=jQuery.noConflict();
//some code here
jQuery(function(j)
{
//code goes here.
//Then I need to write a function here.
// (like the below one or a simple JS function)
jQuery(function()
{
//some stuff
});
});
How can I call that function fr开发者_运维技巧om a simple JavaScript in my web page "head" section?
It's a confusing question, but I'll try.
var j=jQuery.noConflict();
jQuery(function(j) {
// now do whatever you like
// e.g.
// j("#comments").hide();
}
The noConflict()
call is there in case some other library wants to use the $
variable. So you no longer call jQuery code with $()
but with j()
.
Is this what you were asking?
精彩评论