2016年8月8日 星期一

,

[網頁設計] 彈出視窗jQuery套件



1.套件:sweetalert2
2.$(function() {
     $('p').bind('click', function(event) {
        swal({
               title: 'jQuery HTML example',
               html: $('<div>')
                    .addClass('some-class')
                    .text('jQuery is everywhere.')
            })
       );
  })

以上無範例


1.套件:jquery.poptrox.min.js
2.撰寫js
   $(function() {
        var foo = $('#gallery');
        foo.poptrox({
            usePopupCaption: false
        });
    });

3.HTML
<div class="col-xs-8 col-md-8 hover" id="gallery">
    <a href="https://youtu.be/nSJFveEL_38" data-poptrox="youtube,800x480">
        <span>點我看更多</span>
        <img src="images2/btn-08.jpg" class="img-responsive">
   </a>
 </div>

以上範例在321/index2.html中



Share:

0 意見:

張貼留言