SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Zealot
    Join Date
    Aug 2010
    Posts
    197
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    fancy box loads content but does not open on 1 click

    I'm using fancy box 2.1.5
    http://fancyapps.com/fancybox/

    and jquery 1.11.0

    The problem is, when I click this link:
    Code HTML4Strict:
    <a id="fb_link" href="#"></a>

    I expect fancybox to open and show my content in a modal. Instead that content is only loaded into the DOM.

    When I click #fb_link again, fancy box opens and displays content as expected.

    Why doesn't fancybox open and show content on screen after 1 click?

    I've googled the issue and really only found 1 solution but it didn't work for me
    http://stackoverflow.com/questions/4...is-image-twice

    I'm current invoking fancybox like this. But I've changed it so many times and any way I try to invoke fancybox does the same thing.
    Code JavaScript:
    $('#fb_link').on('click',function(e){
     
            e.preventDefault();
     
            $.fancybox(this,{
                padding  : 0,
    	    	closeBtn : true,
    	    	width    : 600,
    	        height   : 400,
    	        autoSize : false,
    	        href     : '../ajax/new_fb.php',
    	        type     : 'ajax'
            });
        });


    Thanks for any help.

  2. #2
    Gre aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    6,003
    Mentioned
    219 Post(s)
    Tagged
    12 Thread(s)
    Hi,

    Can you provide a link to a page where we can see this happening?

  3. #3
    SitePoint Zealot
    Join Date
    Aug 2010
    Posts
    197
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Sorry for the late reply.

    So my boss would rather I not post a link to this project that is not complete. So I copied the project to a separate domain and striped out all the brand info and related code so I could just post the problem. But doing that fixed the bug.

    It seems that the bug was first caused when we moved the entire project to a different server. original and new server are windows 2008 r2. makes no sense right as this bug is all front end code related.

    To prove it, I temporarily pointed my host file back to the original server. the bug wasn't there.
    pointed back to the new server and the bug is back.

    I'm stuck. any ideas what could have caused this from moving the project to a new server?

  4. #4
    Gre aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    6,003
    Mentioned
    219 Post(s)
    Tagged
    12 Thread(s)
    Hi,

    Quote Originally Posted by sessions View Post
    I'm stuck. any ideas what could have caused this from moving the project to a new server?
    No idea, sorry.
    What you're asking is akin to going to the doctors, saying you have a problem, refusing to show him where and then expecting a diagnosis
    I'd need to see the non-working page and the working page, to offer you any kind of opinion.

    On the bright side of things, at least you got your problem sorted.

  5. #5
    SitePoint Zealot
    Join Date
    Aug 2010
    Posts
    197
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Yeah my hands are tied on this one. I'll surely post once the site is live or I figure out what happened.

  6. #6
    SitePoint Zealot
    Join Date
    Aug 2010
    Posts
    197
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Solution:

    I was FTPing files up to the new server. Just found out that there was a truncating issue that I wasn't aware of but is documented here
    http://stackoverflow.com/questions/2...nd-new-rackspa

    that's why copying the project ( from my working local copy ) to other servers ( non ftping ) didn't show the problem.

    just wanted to follow up with everyone.

  7. #7
    Gre aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    6,003
    Mentioned
    219 Post(s)
    Tagged
    12 Thread(s)
    So your files were getting truncated when you were uploading them to your new server?
    Nasty!

    Thanks for taking the time to follow up.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •