jquery - removeClass change not reflected on page -


i attempting remove css class particular div on-the-fly. have following jquery code:

<script type="text/javascript">     $(document).ready(function() {         $('.intro').click(function() {             $('.row_2').removeclass('.last_row');         });     }); </script> 

..with following html

<div class="row_1 intro">intro row 1</div> <div class"row_1 detail">detail row 1</div> <div class="row_2 intro last_row">intro row 2</div> <div class="row_2 detail last_row">detail row 2</div> 

conceptually, when user clicks of intro divs should remove last_row class row_2 divs. however, doesn't seem working css styling applied last_row on rendered page not removed row_2 divs once user clicks on intro div.

is problem jquery code, or there else need relevant divs on rendered page update on-the-fly in response last_row class being removed?

thanks in advance help!

use $('.row_2').removeclass('last_row'); instead of $('.row_2').removeclass('.last_row'); , should work.

the argument passed .removeclass should name of class, without dot.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -