javascript - RSS Count doesn't appear unless I alert a string -
i'm implementing jquery mobile site , i've hit snag when trying show count of rss feeds using class="ui-li-count"
i'm able pull number script not alert or display in class="ui-li-count"
unless alert string first.
for example:
the span trying add count - <span id="rsscount" class="ui-li-count"></span>
code neither alerts or displays count:
<script> $(document).ready(function () { alert(feedcount); $('#rsscount').html(feedcount); }); </script>
code both alerts number and display count inside span after dismiss alert:
<script> $(document).ready(function () { alert("3"); $('#rsscount').html(feedcount); }); </script>
i using zrssfeed feed. idea alert string make work?
feedcount
appears undefined
you defining in response ajax event firing.
document.ready
fires before http request trigger event comes back.
move call html()
callback ajax request.
Comments
Post a Comment