Home > DeveloperSection > Forums > How to open fancybox using jquery?
jacob rasel
jacob rasel

Total Post:88

Points:616
Posted on    May-25-2015 7:41 AM

 JQuery JavaScript 
Ratings:


 1 Reply(s)
 733  View(s)
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.



Hugh Jackman
Hugh Jackman

Total Post:52

Points:366
Posted on    May-25-2015 8:24 AM

<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>


Don't want to miss updates? Please click the below button!

Follow MindStick