Is it possible to use the jquery selector :nth-child() with a parameter ?
var ok = function(a)
{
$("#divid:nth-child(a)").click(function()
{
.............
});
};
$(function()
{
$("#divId2").click(ok(4));
});
Thanks for your help!!
Sure you can, simply do
$('#divid:nth-child(' + a + ')').blabla.Oh, and make sure a is actually a number, or you might get unexpected results/errors.