jquery - How do i call external javascript function/lines in html? -
in javascript file have code:
$(function() { $('#carousel span').append('<img src="img/gui/carousel_glare.png" class="glare" />'); $('#thumbs a').append('<img src="img/gui/carousel_glare_small.png" class="glare" />'); $('#carousel').caroufredsel({ responsive: true, circular: false, auto: true, infinite: true, items: { visible: 1, width: 200, height: '56%' }, scroll: { fx: 'directscroll', pauseonhover: true, duration: 500 } }); $('#thumbs').caroufredsel({ responsive: true, circular: false, infinite: false, auto: false, prev: '#prev', next: '#next', items: { visible: { min: 2, max: 6 }, width: 150, height: '66%' } }); $('#thumbs a').click(function() { $('#carousel').trigger('slideto', '#' + this.href.split('#').pop() ); $('#thumbs a').removeclass('selected'); $(this).addclass('selected'); return false; }); });
i want when pauseonhover execute happen in html file. in html file included javascript file already:
<script src="java_script.js"></script>
also added style code test:
<style>.container { background: rgb(170, 187, 97); background: rgba(170, 187, 97, 0.5); }</style>
and when pauseonhover execute happen in javascript file want display on screen 2 lines in html file:
<div class="container">lorem ipsum dolor</div> <div class="container">lorem ipsum_for_testing dolor</div>
Comments
Post a Comment