Tuesday, July 8, 2008

Select Tag



Sign-up form

Click on the labels and drag to choose appropriate options



Code for Job Title:
$('#jobtitlelabel').pls(
{
foreachpixel:5,
changevalue:1,
downlimit:1,
uplimit:1,
changetarget:$('select[name=jobtitleselect]'),
}
);
Code for Month:
$('#monthlabel').pls(
{
foreachpixel:5,
changevalue:1,
downlimit:1,
uplimit:1,
changetarget:$('select[name=monthlabel]'),
}
);
Code for State:
$('#statelabel').pls(
{
foreachpixel:5,
changevalue:1,
downlimit:1,
uplimit:1,
changetarget:$('select[name=stateselect]'),
}
);
Code for Country:
$('#countrylabel').pls(
{
foreachpixel:5,
changevalue:1,
downlimit:1,
uplimit:1,
changetarget:$('select[name=countryselect]'),
}
);
As other text input nodes you will pass target select tags in a jquery wrapper to changevalue property. When implemented, the changevalue, downlimit and uplimit property values aren't evaluated by the plugin. Because, for a select tag down limit always is zero, up limit is total option tags length that select tag contains and changevalue equals to 1 to select option tags one by one. These are claculated at run time. So you can pass 1 to downlimit and uplimit properties but it willn't have any effect on the process of plugin.

No comments:

Post a Comment