jquery - addClass not working in IE8 -


it seems addclass not working ie8 reaosn. made <div> , <p> , , want assign class <p> when <div> clicked not working in ie8.

.test {     width: 100px;     height: 100px;     background: red; }  <div class="test"></div>  <p>deeded</p>  $('.test').click(function() {     $('p').addclass('code'); }); 

the class not added in ie8. why?

you didn't define code class , write in comment (you should write in question..) want use class flag

for purpose should use html data attribute:

see: http://www.w3schools.com/tags/att_global_data.asp

and: is there problem using html5's "data-*" attributes older browsers?

as you're interested in supporting ie8


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -