Hello,
i have some javascript that i execute inside a $(document).ready to init
stuff need to be done if javascript is available. now i want to
pass parameters somehow. My first thought was just to use an standart
attribute like <a href=".." class="isearchforthis" lang="myparams">.
But this seems to be no good solution because i want my documents do be
valid xhtml strict ...
So my new approach is to use a pseudo class to like <a href=".."
class="doStuff mode1"> for example.
So the "mode1" class is just a pseudo class that i used to determine
which mode to use.
The code look like this:
/$(window).load(function() {
$(".doStuff").each(function(){
var cl = $(this).attr('class');
if(cl.test('paramMode1')) {
}else if(cl.test('paramMode2')) {
}else { // default mode
}
});
});
/If i want to specifie more than just a mode parameter are there any
other ways to pass parameters
to my function that does not break xhtml validation ?/
/best regards,
Truppe Steven
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/