I have a marquee which scrolls dynamic data in my web application, which halts a bit starts scrolling again, its like someone stops it and drags again kind of a behavior when other ajax responses receive and update data in html page. Is this a issue with marquee tag?
<marquee scrollamount="1" scrolldelay="10">
<span id="HPQ" class="syPrice">22.20</span>
<span id="APQ" class="ayPrice">12.20</span>
<span id="BPQ" class="byPrice">18.10</span>
<span id="CPQ" class="cyPrice">65.20</span>
<span id="DPQ" class="dyPrice">87.56</span>
<span id="EPQ" class="eyPrice">15.24</span>
<span id="FPQ" class="fyPrice">34.45</span>
<span id="GPQ" class="gyPrice">16.20</span>
</marquee>
and my ajax calls responses continuously updates this page as well.
function dataUpdate(){
$.ajax({
type : "GET",
url : '../myJsonData.xhtml',
dataType : "json",
async : true,
cache : false,
success: function(data) {
$.each(data, function(i, item) {
/* updates data here */
});
setTimeout('dataUpdate()',1000);
},
error : function() {
}
});
}
I update the marquee data in similar manner like above ajax call
No, it’s not an issue with the marquee tag specifically.
The browser only does one thing at a time in the user interface. As long as a script is running, there are no updates at all in the page.
If you have any other moving element, for example an animated GIF, you would see that they would also pause for a bit while the script is running.