Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

FancyBox Close Button and Click Off not working

Community Beginner ,
Dec 07, 2017 Dec 07, 2017

I have a website I'm developing starting with one image and thumbnail first; then will be adding many possibly using php for now just html, js and css.  I have linked in fancybox and jQuery js and css, from  fancyBox site

The site is updated to SiteGround (where all files reside) to test results.  It works:  thumbnail shows, click on it and larger image appears.  But, the close button does not show and clicking off does not close large image.  I have to refresh browser to go back to thumbnail.  I have been referencing fancyBox site to build code.  I also tried

<!-- <script type="text/javascript">

$(document).ready(function() {

$(".fancybox").fancybox({

buttons: [

'zoom',

'close'

]

});

});

</script>-->

that I found from another source.  I had same results (images showing but not close button)  It seems this could be something simple because default fancybox set up shows the 'close' options on examples I have seen.  Perhaps a Z index setting or page size.    Please Help.....thanks

9.7K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Dec 07, 2017 Dec 07, 2017

Have you included the https: in the link to the jQuery library: (It might be as simple as that)...

https://code.jquery.com/jquery-3.2.1.min.js

Translate
LEGEND ,
Dec 07, 2017 Dec 07, 2017

Have you included the https: in the link to the jQuery library: (It might be as simple as that)...

https://code.jquery.com/jquery-3.2.1.min.js

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 07, 2017 Dec 07, 2017
LATEST

If you don't see the toolbar across the top, that means your Fancybox function script is broken.  It's not invoking at all.

Below is a working demo with latest Fancybox 3.   View source to see the code.

Alt-Web Demo : Dynamic Photo Gallery with Bootstrap, PHP & Fancybox

Nancy

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines