SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    SitePoint Member
    Join Date
    Oct 2011
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Slideshow Onload Issue

    Hey All!

    I built a slideshow using jQuery Elixon Theatre and am having trouble with how it initializes across different browsers. For example, the images might zoom in and freeze momentarily in Chrome as it initializes or load over-sized and disproportionately in Safari but corrects itself after a few seconds. Is there any way to have it load and initialize properly across different browsers?

    Thanks, Sean

  2. #2
    SitePoint Evangelist
    Join Date
    Jun 2008
    Posts
    455
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do you have a link to your page so we could take a look at it?

    Cheers

  3. #3
    SitePoint Member
    Join Date
    Oct 2011
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I do!

    http://sixthsenselaw.com/

    Thanks Michael

  4. #4
    SitePoint Member
    Join Date
    Oct 2011
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Hey!

    Did that link work for you?

    Sean

  5. #5
    SitePoint Evangelist
    Join Date
    Jun 2008
    Posts
    455
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,
    Don't hold me to this but try encompassing your javascript call in the following

    HTML Code:
    $(document).ready( function(){
     // Javascript stuff here...
    });
    This would stop the jquery actioning before the page is fully loaded.

    Let me know if it helps.

  6. #6
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,862
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    If you move the script to just before the </body> tag (which is where JavaScript belongs so that it doesn't slow the loading of the page) then you may be able to get rid of the code that tests if the page has loaded because at that point you know it already has.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  7. #7
    SitePoint Evangelist
    Join Date
    Jun 2008
    Posts
    455
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It is just before the closing body tag isn't it?

  8. #8
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,862
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by L4DD13 View Post
    It is just before the closing body tag isn't it?
    Well if it is there then why are you worrying about onload or ready. Just run the code straight away as tat that point the page has already loaded.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  9. #9
    SitePoint Evangelist
    Join Date
    Jun 2008
    Posts
    455
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well adding the check appeared to fix the issue. But the OP hasn't tried it out yet.

  10. #10
    SitePoint Member
    Join Date
    Oct 2011
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I just moved it all down there but it doesn't seem to be getting rid of the zoom and other onload issues. Thanks felgall for the pointer though!


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
  •