jquery - selecting and showing a li element of ticker bxslider on the page -


i'm trying write code selecting , showing li element of ticker bxslider on page. when use ticker bxslider, images going , coming 1 side of screen other side. want random image of slider click show on screen. here ticker bxslider code is

<div class="row sliderticker">        <ul id="bxsliderid" class="bxslider">          <li class="class1"></li>          <li class="class2"></li>          <li class="class3"></li>          <li class="class4"></li>          <li class="class5"></li>          <li class="class6"></li>          <li class="class7"></li>          <li class="class8"></li>       </ul> </div> <div class="row changeable">     <li class="changeableitem"></li> </div> 

i put images every class background-images.and changeable div field show image clicked. here script codes

<script type="text/javascript"> $('.bxslider').bxslider({   minslides: 7,   maxslides: 8,   slidewidth: 1200,   slidemargin: 10,   ticker: true,   speed: 30000 }); </script> <script type="text/javascript"> $(document).ready(function () {    $( ".bxslider li" ).click(function() {       var classname = $(this).attr('class');       $('li.changeableitem').addclass(classname);       $(this).siblings().removeclass(classname);    });    $( "li.changeableitem" ).click(function() {       $('li.changeableitem').hide();    }); }); </script> 

when use these codes, can show image clicked on changeable div. if clicked class3 li, shows if click class1 item cannot see it. if select classx li , cannot select li items before xth item. , can show li images once. if click second time , not work. me? thank in advance.

i think problem due

$(this).siblings().removeclass(classname); 

line in first .click() function.


Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -