I’ve attached files on bottom of the page (before body):
<script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
<script src="/js/mobile.js"></script>
<script src="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.js"></script>
in mobile.js is code like that:
$(document).ready(function(){
console.log('test')
});
and firebug returns me ‘test’ twice, why?
It is recommended to use the
pageInitevent with jQuery mobile as opposed to$(document).ready. See this page for more details: jQuery Mobile Docs – Events.The code you could use:
That may fix your problem.