Moving same-day events into one container

https://www.gree nwic haca e.cfm?p=85 6&lastid=856&do=logoffadmin

Pw is 2016workorder

I’m trying to move all same-day events into the same container. If you view the console, you’ll see the values seemingly correct, but whenever I go to do the appending, its just appending into the same container it was always in. So indexOfDates is always the correct value, it looks like, but $(this).eq(indexOfDates) is just r eturning the element that you’re looped on.

Even just console logging $(this).eq(1) (a static number) changes during each loop.

$(".calStyle2 > ul > li").each(function() {
            var indexOfDates;
            $(this).find(">.eventobj").each(function(i) {
                if($(this).find(".event_stackdate:not(.event_stackrepeat)").length) {
                    console.log(indexOfDates + " ran");
                else {
                    console.log(indexOfDates + ": i /// "+ $(this).eq(1));

Got it. I had to .parent() and then traverse back down. I as caught up in the .each().

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.