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
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

jQuery Slide function + ajax

  • 06-12-2007 08:24PM
    #1
    Registered Users, Registered Users 2 Posts: 3,479 ✭✭✭


    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, Registered Users 2 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, Registered Users 2 Posts: 3,479 ✭✭✭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, Registered Users 2 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, Registered Users 2 Posts: 3,479 ✭✭✭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