The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Jquery focus and now Toggle

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #24086

    Hi everybody,

    I’ve some trouble with the framework jQuery
    Indeed, when a display a div with the function "slidedown" the page goes up !
    Let me show you : … bles.html#
    When i click on "Plus d’info" wich means " More information"
    It’s like i had a anchor a the top of my page, thus, eachtime i click on "plus d’info" the page ride up to the top

    PS : i tried to put an anchor on the none display div, but, it still acts odd

    Maybe there is a function who permit to avoid all these trouble

    Sorry for my english, I’m a French guy :) From Paris

    Here is my js file :

    // JavaScript Document

    $(‘.disp1’).click(function() {

    $(function() {
    $(‘.hid1’).click(function() {

    and my css file :

    display: none;

    Rob MacKay

    firstly your "display", "yes" is not going to work – css dosnt have a "yes" option.

    have a look

    Your page, which I cant access, probably slides up because the element you are hiding is hidden. When you hide an element its like it never existed – so the rest of your page will move in to fill the space left behind.

    If you want the space to be kept, best wrap your element in a div and specify a height or min-height…

    PS: I cant get on your page – probably because my connection is limited atm… its probably me not you. lol

    $(‘.disp1’).click(function() {

    return false;


    add return false;

    that should stop the page jumping to the top (i think)

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.