aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes jQuery newbie doubts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "jQuery newbie doubts" Watch "jQuery newbie doubts" New topic
Author

jQuery newbie doubts

Nakataa Kokuyo
Ranch Hand

Joined: Jul 24, 2011
Posts: 184
Good day,

could anyone here please enlighten me what is "function ()" means from below ?



Thank you !
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60997
    
  65

It's a function literal, also known as an inline function or an anonymous function. It creates a new unnamed function.



[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60997
    
  65

By the way, there's a more commonly used shortcut for creating a ready handler, and that's to pass an inline function to the $ function:

Nakataa Kokuyo
Ranch Hand

Joined: Jul 24, 2011
Posts: 184
Thanks Bear ! another questions, how can i call the inner function "mytest" from input like button and other ?

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

I'd recommend you take some time and do a little reading. Here, for example. This will answer a lot of these "jQuery 101" type questions. Bear's book is also a great read if you can pick it up.


Or better yet



GenRocket - Experts at Building Test Data
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jQuery newbie doubts