run javascript on NEXT MONTH

Home Forums Welcome! Pre-Sales Questions run javascript on NEXT MONTH

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #15312
    Eric
    Participant

    My calendar is at this URL: http://www.rackandhelens.com/rack/calendar/

    WHen I go to the next month, you will see the table zebra striping go away.

    I have a javascript function to add the class, but I need to run it when the new month is loaded.

    Any ideas?

    #15315
    Rob
    Member

    Hey Eric. Slick looking site. I’m happy to try and help you out here, but I am unable to see the issue here…best I can tell the calendar looks the same whether I’m at the current month or one in the future. Have I misunderstood the request here?

    #15333
    Eric
    Participant

    Rob –

    Thanks for helping out. I’ve restored it to the “BROKEN” condition.

    Here’s what I am doing:

    1. When the page loads, I use jquery to addClass to the ODD and EVEN rows (creating the zebra stripe).

    The problem as best I can figure it is that when a new table is loaded, it comes in via AJAX so the document.ready handler is NOT refired. I have a javascript function called doStripe() that will do the trick, but don’t know how to call it.

    To fix the problem, I went into /lib/events.js and commented out the PJAX lines around line 59 – this forced the page to do a true reload instead of an ajax call. This fixed the problem, but I’d like the ajax load if possible.

    Thanks for the comments about the site. It is coming along nicely. We have a TON of custom data types handling a lot of the data stuff.

    #15340
    Eric
    Participant

    I had to recomment out the lines. We needed the site live for the weekend (it’s a restaurant…).

    And, the file I’m messing around with is /resources/events.js not /lib/events.js just FYI.

    Also, I need to chagne the top half background picture as well. So, for now this works good.

    But, I need some kind of call back function after the pjax loading…

    Thanks.

    #15349
    Rob
    Member

    Hey Eric. Thanks for the follow-up here; glad to see you found a workaround of sorts here. This issue of the callback function is a bit outside my area of expertise, but let me see if one of our devs has an idea when they hit the forums next.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘run javascript on NEXT MONTH’ is closed to new replies.