javascript - TypeError: $(...).fullscreen is not a function -
i trying create full-screen button opening page elements in fullscreen mode. use plugin https://github.com/private-face/jquery.fullscreen/ it's working fine on there examples/index.html
when use on theme doesn't working , it's showing typeerror: $(...).fullscreen not function
inside console .
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>(successfully loaded) <script src="{$smarty.const.curr_theme}jquery.fullscreen.min.js"></script>(successfully loaded)
js
<script type="text/javascript"> $(function() { // open in fullscreen $('#fullscreen .requestfullscreen').click(function() { $('#fullscreen').fullscreen(); return false; }); // exit fullscreen $('#fullscreen .exitfullscreen').click(function() { $.fullscreen.exit(); return false; }); // document's event $(document).bind('fscreenchange', function(e, state, elem) { // if in fullscreen mode if ($.fullscreen.isfullscreen()) { $('#fullscreen .requestfullscreen').hide(); $('#fullscreen .exitfullscreen').show(); } else { $('#fullscreen .requestfullscreen').show(); $('#fullscreen .exitfullscreen').hide(); } }); }); </script>
html
<li id="fullscreen" class="dropdown codo_dropdown"> <button type="button" class="requestfullscreen btn btn-default btn-sm"> <span class="glyphicon glyphicon-fullscreen"></span> fullscreen</button> <button type="button" class="exitfullscreen btn btn-default btn-sm" style="display: none"></button> </li>
i can't fix please me! sorry bad english.
thank !
Comments
Post a Comment