www.webdeveloper.com
Results 1 to 8 of 8

Thread: Issue with jQuery, JS, or my HTML... Not sure...

  1. #1
    Join Date
    Dec 2012
    Posts
    81

    Issue with jQuery, JS, or my HTML... Not sure...

    I created an overlay for my website, but completed it in a separate file for testing purposes. Now, I'm ready to implement it to my site, and I am having a lot of issues. It simply won't work.

    Here's the test link for the one that works: http://webfro.gs/south/modal-overlay/

    -Click on the small plus-sign, on the left, and the modal window will open. Click anywhere outside the centered images, and the modal closes.

    Here's the link for the site I'm trying to load it onto: http://webfro.gs/south/kb3

    -Click on the large toolbox, on the right, and the modal opens up.

    The files are all uploaded to the appropriate directories, but for some reason one work, and the other doesn't. I thought it might have something to do with tucking the code inside a <div> tag, but tested that already and it's not the issue.

    I've tested the working one in IE8, IE9, Chrome, and Firefox and it works just fine. But can't seem to implement it in the site I need it for.


    Your advice is greatly appreciated.

    -Jared

    PS - The CSS borders (on the KB3 site) are supposed to be there. They help me with the layout.
    Last edited by jlnewnam; 05-02-2013 at 05:58 PM.

  2. #2
    Join Date
    May 2006
    Location
    Somewhere behind your screen
    Posts
    1,656

  3. #3
    Join Date
    Dec 2012
    Posts
    81
    Can you be more specific?

    When I integrated it into the site from the test site, I just copied/pasted the files.
    If you can explain why it works on the test site and not the other?

  4. #4
    Join Date
    May 2006
    Location
    Somewhere behind your screen
    Posts
    1,656
    it seems there is no such file on the server - just click on the link above

  5. #5
    Join Date
    Dec 2012
    Posts
    81
    Okay. That's fixed, and now it works, but only inside the <div>. It's not masking the entire page. Thoughts?

  6. #6
    Join Date
    Dec 2012
    Posts
    81
    Almost there Padonak!

    It would appear that I've now fixed it. Apparently, while having the current library on file, I must have accidentally manipulated it somehow. I re-downloaded the latest library from jquery.com and re-rendered the site and it's working.

    On another note... I'd like to be able to get the modal to fill the entire screen, and not just in the confines of the browser's border.

    Is this possible?

    Thanks for your help, Padonak!

    http://webfro.gs/south/kb3/
    Last edited by jlnewnam; 05-03-2013 at 10:57 AM.

  7. #7
    Join Date
    May 2006
    Location
    Somewhere behind your screen
    Posts
    1,656
    what if you try $('body') instead of $(window) for measuring?

    Code:
    //get the height and width of the page
    var window_width = $(window).width();
    var window_height = $(window).height();

  8. #8
    Join Date
    Dec 2012
    Posts
    81
    I tried that and it didn't activate the modal at all.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles