jquery - Circumvent random number in ID -


i got line in script, check items class:

$('#post').attr('class'); 

is there chance, read like:

$('#post*').attr('class'); 

so if id fe. post405 still read this? i've checked , won't work * , so there other way read items way?

$('[id^=post]').attr('class'); 

you're looking [attribute^=*] selector.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -