Need help selecting muiltiple div id's in jquery -


i trying select multiple id's using jquery. following code wrote not working.

var cat = $('.option_category').each(function() {   var cat_id = cat.attr('id');   console.log(cat_id'); }); }); 

this should resolve issues.

var cat = $('.option_category').each(function(){     var cat_id = $(this).attr('id');     console.log(cat_id); }); 

as aside, id attribute identification. not know implementation, however, if trying pass data through id, value parameter of option tag or data attributes.

https://developer.mozilla.org/en-us/docs/web/guide/html/using_data_attributes


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -