javascript - Fancybox custom parameters will not work -
i calling fancy box "onclick" in php/html code , pass location of image or video depending on item user clicks so:
$txt= $row['location']; $ext="openfancybox('$txt')"; so have 2 fancy box functions, 1 images , 1 videos (because displaying different content.
fancy box code:
$(document).ready(function () { $('.fancybox').fancybox(); }); function openfancybox(vid) { $.fancybox({ 'content': '<video id="abc" width="320" height="240" controls><source src="urltosite' + vid + '" type="video/mp4"></video>' }); } function openfancyboximg(img) { $.fancybox({ 'content': '<img src="urltosite' + img + '" />', 'autosize': true }); } so works me , fancybox opens on click , displays given media. want add additional parameters fancy box... alike autosize,transitionin, title..etc
but no matter set these parameters in of above functions not have effect, example can see above, added "autosize" in hope user not have scroll , down view image....but changed nothing!
i appreciate help, new fancybox. in advance!
Comments
Post a Comment