wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes JQuery:-different way to write function Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "JQuery:-different way to write function " Watch "JQuery:-different way to write function " New topic
Author

JQuery:-different way to write function

Praful Thakare
Ranch Hand

Joined: Feb 10, 2001
Posts: 614
Hi,

I have written a bind event in following style



i get key object as parameter to onAutoKeyUp(key) function, now i have a requirement to pass few more parameters so i used different style


wonder how to use .keyup and pass more parameters.

-P


All desirable things in life are either illegal, banned, expensive or married to someone else !!!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60822
    
  65

That's not the way that JavaScript works. If you need data to be in scope during the execution of a function, closures are the customary way to make sure that it can be accessed.

Without more information I can't really give any examples.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JQuery:-different way to write function
 
Similar Threads
dynamic addition of numbers entered in textbox
KeyPressed Problem
need enclosing form name of a element in jquery
jquery:- binding the function
JavaScript code works in firefox but not in IE8