Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

jQuery Slide function + ajax

Options
  • 06-12-2007 9:24pm
    #1
    Registered Users Posts: 3,401 ✭✭✭


    Hi Lads,

    So I've basically created a calendar and I'd like to click on a date and a hidden div would appear containing things happening on that date.

    I was wondering

    1st do I have to create 31 empty divs and use ajax to populate the ones that have events in them

    and

    2nd Just wondering if anyone had a simple function to use the jquery slide? Did a google but all the code seems to be broken up?

    I basically have a hidden div that I would like to "slide" appear when I click on something?

    Hope it isn't too difficult!

    Thanks
    Gary


Comments

  • Registered Users Posts: 3,594 ✭✭✭forbairt


    Would it not make more sense to have one div hidden ... you make an ajax call for that date and it populates the div and slides in ?


  • Registered Users Posts: 3,401 ✭✭✭randombar


    That's definitely a better idea all right, is there any easy code for the slide? Something like show and hide JS?

    Thanks
    Gary


  • Registered Users Posts: 3,594 ✭✭✭forbairt


    http://docs.jquery.com/Tutorials:Live_Examples_of_jQuery
    $("div.contentToChange p.firstparagraph:hidden").slideDown("slow");
    $("div.contentToChange p.firstparagraph:visible").slideUp("slow");
    

    should do the trick ? slightly modified of course


  • Registered Users Posts: 3,401 ✭✭✭randombar


    Hi,
    I'm bringing this up again (sorry) got it working ok but it only works with a fixed height div:

    Click on the dates: http://www.ratemypub.ie/template/index.php

    anyone know how i can change it to dynamic? that jquery stuff seems a bit over my head for some reason?


Advertisement