-2
rated 0 times
[
2]
[
4]
/ answers: 1 / hits: 60910
/ 13 Years ago, tue, november 29, 2011, 12:00:00
I'm trying to add a custom attribute on my element using jquery :
$('.map-areas-div').rand(numElements).each(function(){
$(this).attr('element_id',4);
});
But in the end, my elements doesn't have a element_id attribute.
PS, my html elements look like :
<div type=ground class=map-areas-div style=position: absolute; top: 900px; left: 720px; height: 40px; width: 90px;></div>
Thank you for help
More From » jquery