Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder
    Join Date
    Sep 2002
    Location
    Scotland
    Posts
    407
    Thanks
    0
    Thanked 0 Times in 0 Posts

    cross-browser sliding div's

    thanks to cross-browser.com i've borrowed some code and produced:

    http://www.whatsinmypocket.co.uk/vir...site/index.htm

    BUT here comes the next part...
    The link above works fine if you put the mouse over the appropriate div. What i would like to do instead is have the new div slide down upon clicking of the link rather than just mouse over. any ideas??
    My body's a temple... and like those ancient Greek ones it's a ruin
    sweenster.co.uk

  • #2
    Senior Coder
    Join Date
    Feb 2004
    Location
    Edinburgh
    Posts
    1,352
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by sweenster
    What i would like to do is have the new div slide down upon clicking of the link rather than just mouse over.
    that's a nice effect.

    if you change the event to onclick as opposed to onmouseover, won't that do wot you want? also, don't use JS URLs, since it's not accessible and prevents you from using a viable alternative, ie a genuine link for non-JS browsers.

  • #3
    Regular Coder
    Join Date
    Sep 2002
    Location
    Scotland
    Posts
    407
    Thanks
    0
    Thanked 0 Times in 0 Posts
    if only it were that simple!

    http://cross-browser.com/x/examples/slideouts.html was the original code that i downloaded and modified (http://cross-browser.com/toys/ for script download if you're interested)

    The external javascript makes the page cross-browser compatible. I'm going to add a non-javascript enabled page later on.
    My body's a temple... and like those ancient Greek ones it's a ruin
    sweenster.co.uk

  • #4
    Regular Coder
    Join Date
    May 2004
    Location
    Alabama, USA
    Posts
    237
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi sweenster,

    I'm glad you like my toys, and I really like how you're using them on your page :-)

    A few comments...

    1) I've been removing the use of xInclude() from the demos. Obviously I missed the slideOut demo ;-). xInclude() was a fun little experiment, but it's overkill and causes more problems than it solves. I've now updated the slideOut demo to not use it.

    2) I have another demo (just recently completed) which may be more appropriate for your application. Check out the xSlideMenu1 demo.

    Thanks!

  • #5
    Regular Coder
    Join Date
    Sep 2002
    Location
    Scotland
    Posts
    407
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by MikeFoster
    Hi sweenster,

    I'm glad you like my toys, and I really like how you're using them on your page
    Aw shucks!

    I've used that new menu script to produce:
    http://www.whatsinmypocket.co.uk/vir...site/index.htm

    Still a slight problem with it though - whenever the user clicks to activate a link, if the previous one is still open the new one tumbles down without closing the original one, but i'll think up something for that i'm sure.

    Also, in firefox it works ok wherever you click, but in IE it works if you click the anywhere in the div EXCEPT over the text. weird....
    My body's a temple... and like those ancient Greek ones it's a ruin
    sweenster.co.uk

  • #6
    Regular Coder
    Join Date
    May 2004
    Location
    Alabama, USA
    Posts
    237
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I worked a little more on the xMenu1 Demo, and added another variation which is closer to what you need: menu opens onclick, closes onclick, and when opening closes all other open menus.

    (sorry about changing names on ya )


  •  

    Posting Permissions

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