I want to send multiple arguments to JQUERY event functions.For sending one data i put it in value attr in html code.
<li id="<?php echo 'v'.$value['vehicleid'] ?>" value="<?php echo $value['vehicleid']; ?>" >
And get data in JQuery event function with $(this).val() But i don’t know how can i pass multiple php data to JQuery event function!
these data are dynamic and produced by php code.
You cannot use val() on an
liit is supposed to be used on form elements like input for which there is a valid attribute calledvalueFor an li you can use data attributes
and use:
For passing multiple data you can seperate each id with some char like “-“:
which should produce something like:
then do
just make sure charachter used for seperation is not used for vehicle ids
This should help you:
Quote from Resig: