Results 1 to 7 of 7

Thread: Expandable Sticky Bar problem

  1. #1
    Join Date
    Dec 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Expandable Sticky Bar problem

    1) Script Title: Expandable Sticky Bar

    2) Script URL (on DD): http://dynamicdrive.com/dynamicindex17/stickybar.htm

    3) Describe problem:

    I work usually in google chrome, i tried this and it worked fine, but in ie it doesn't work. So i cut it down to the bare minimum to see if i could fix it.
    Can't make it work in ie, and i know my ie will run it as the one on your site works fine in both browsers.

    Anychance someone could let me know where i'm going wrong.

    http://shirtdessert.com/test

    Thanks

  2. #2
    Join Date
    Dec 2010
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I understand your frustation

    Can you post your code??

    Thanks

    jline

  3. #3
    Join Date
    Dec 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    <head>

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>

    <link rel="stylesheet" href="expstickybar.css" />

    <script src="expstickybar.js">

    /***********************************************
    * Expandable Sticky Bar- (c) Dynamic Drive (www.dynamicdrive.com)
    * This notice MUST stay intact for legal use
    * Visit http://www.dynamicdrive.com/ for this script and 100s more.
    ***********************************************/

    </script>
    </head>
    <body>
    <div id="stickybar" class="expstickybar">

    <a href="#togglebar"><img src="open.gif" data-closeimage="close.gif" data-openimage="open.gif" style="border-width:0; float:right;" /></a>
    <div style="text-align:center;padding-top:3px"><b>Copyright (c) 2010 Dynamic Drive</a></div>
    More content here

    </div>
    </body>

    Thanks
    Pete

  4. #4
    Join Date
    Dec 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I forgot to define the <!DOCTYPE HTML>
    It now works perfectly. oops :S

  5. #5
    Join Date
    Dec 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    While this is a great little script it is just not useable on pages that are likely to be accessed by a browser that doesn't support Position:Fixed ie Mobile Safari on iPhone, iPad etc.

    How would anyone suggest modifying it so that one of these Browsers didn't display ESB content at all.

    David

  6. #6
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Quote Originally Posted by DeltaDave View Post
    While this is a great little script it is just not useable on pages that are likely to be accessed by a browser that doesn't support Position:Fixed ie Mobile Safari on iPhone, iPad etc.

    How would anyone suggest modifying it so that one of these Browsers didn't display ESB content at all.

    David
    The script currently does detect browsers on desktop that do not support CSS fixed and not show the bar. To do the same for mobile browsers, you might try changing:

    Code:
    if (!cssfixedsupport || window.opera)
    inside the .js file to:

    Code:
    if (!cssfixedsupport || window.opera || navigator.userAgent.match(/Android/i) || navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPod/i))
    The above code is untested, as I do not have an net enabled mobile phone. If it doesn't work, you might try doing a search on google for JavaScript code to detect mobile devises, then add that detection into the original conditional statement above to screen for them.
    DD Admin

  7. #7
    Join Date
    Dec 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for that - I will try it and report back.
    David

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
  •