Hello, I am looking for a way in which I can grab an element id from my page like this:
<div id="events">
<div id="event_1765" class="type_automotive start_125x125 color_Black">
<h3>Leftlane News</h3>
</div>
</div>
I would like to get the id="events" but I need it in this script where the events is:
$("input.type_check").click(function() {
if($(this).is(':checked')) {
$("#events div."+$(this).attr('id')).removeClass('type_hidden');
$("#events div").not(".type_hidden, .start_hidden, .color_hidden").css("display","block");
} else {
$("#events div."+$(this).attr('id')).addClass('type_hidden');
$("#events div."+$(this).attr('id')).css("display","none");
}
});
so, in other words I would like to replace the 'events' in the jquery script with a code that dynamically gets the id element on the html page.