How to open fancybox using jquery?

Total Post:88

Points:616
 1535  View(s)
Ratings:
Rate this:

Here I want try to open a fancybox.

 But not open successfully I can’t understand what is problem

Please solve this problem.

Thanks in advance.

  1. Post:51

    Points:359
    Re: How to open fancybox using jquery?

    <a href="#" id="showFancybox">Show me</a>
    <script>
    var result = '<div class="item"> <div class="img"><a href="./Композиция состоит из 3 разноцветных шариков, размером 30 см, расположенных на единой ленте, декорированной маленькими шариками.<br /> "><img id="dp894" src="http://i.stack.imgur.com/1jCEv.jpg?s=128&g=1" alt="Композиция"/></div></div>';
     
    $('#showFancybox').click(function() {
        $.fancybox({
          'content'  : result,
          'width' : 600,
          'height': 500
        });
    });
    </script>

      Modified On Apr-09-2018 11:31:09 PM

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!