jQuery .html not writing span on page load, rights the span on ajax response
- by pedalpete
I've got a bit of a calendar I'm building with events that go beyond the boundary of one day.
I've got a graph which shows how many events are running concurrently.
In order to graph out the events which go into another day, I look for hours24, and run an extra bit of code.
jQuery('li#hour'+placeGroup+'_'+schedDay2+'_'+thisHour,nextDay).data('count', numStaff).html(''+printHour+''+numEvents+' scheduled').css('height',numEvents*5+'px');
The code is working, the li items are being found, proper height is the css is being applied, data is set, which I've checked by running
alert(jQuery('li#hour'+placeGroup+'_'+schedDay2+'_'+thisHour,nextDay).data('count'));
right after the pervious bit of code.
The only thing that isn't being done is the .html(add span) stuff.
I run this code in two places. Once when the page loads, and once when an action is taken which changes the number of events via an ajax response.
The li DOM object I'm writting to is created before the script is run, and the height is being applied, but not the span, and only on page load.
Any ideas on this one? I'm stumped.