Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set data in jquery plugin

Status
Not open for further replies.

Denster

Programmer
Apr 9, 2001
198
GB
I'm writing a jquery plugin that manipulates data passed to it. Is there any way of setting the data on the calling element. For example my calling method would be
$('#elementID').myplugin({formData:data})
Then within the plugin I want to do something like this
$(this).data('result','value I want to set)
$(this).data('result2','another value I want to set)
This is so I can retrieve it later to do some further processing.
I know I could just use hidden fields on the form, but thought this would be a cleaner solution.

Any suggestions?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top