How to change class in jquery element?
-
Hello,
I’ve customized UI slider on my site. Here is my HTML.
<div id="ei-slider" class="ei-slider"> <div class="ei-slider-loading" style="display:none;">Loading</div> <ul class="ei-slider-large"></ul> <ul class="ei-slider-thumbs" style="max-width: 450px; width: 100%; display: block;"> <li class="ei-slider-element" style="max-width:150px; width: 33%; left: 0px;">Current</li> <li style= "max-width:150px; width: 33%;"> Image 1 </li> <li style= "max-width:150px; width: 33%;"> Image 2 </li> </ul> </div>
What I need to do is change the max-width:450px to 1150px which is on my fourth line.
<ul class="ei-slider-thumbs" style="max-width: 450px; width: 100%; display: block;">
Actually it’s inbuild css. So I tried to change class by this script but didn’t work.
<script type="text/javascript"> $("ul.ei-slider-thumbs").attr('class', 'mylength'); </script>
CSS:
.mylength{max-width: 1150px; width:100%; display:block;}
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘How to change class in jquery element?’ is closed to new replies.