javascript - Unslider + jquery mobile? -
javascript - Unslider + jquery mobile? -
so, found amazing plugin called unslider, seems dissapear on jquery mobile. i'm trying implement basic example. here's code:
html:
<head> <link rel="stylesheet" type="text/css" href="css/main.css"> <script src="js/vendor/jquery-1.9.0.min.js"></script> <script src="js/vendor/jquery.mobile-1.4.2.min.js"></script> <script src="js/vendor/unslider.min.js"></script> <script src="js/vendor/jquery.event.swipe.js"></script> <script src="js/main.js"></script> </head> <body> <div data-role="page" id="firstpage"> <div data-role="main" class="ui-content"> <div class="banner"> <ul> <li>this slide.</li> <li>this slide.</li> <li>this final slide.</li> </ul> </div> </div> </div> </body>
main.css:
.banner { position: relative; overflow: auto; } .banner li { list-style: none; } .banner ul li { float: left; }
main.js:
$(document).on("ready", function () { $('.banner').unslider(); });
but nil displays (when combined other jquery mobile pages). when utilize 1 page, unslider shown normal list.
how can create work?
issue called unslider
on wrong/undefined dom element
there no dom element class='initinstructionsslider'
in html
insted of
$('.initinstructionsslider').unslider();
write
$('.banner').unslider();
jsfiddle
javascript html5 css3 jquery-mobile unslider
Comments
Post a Comment