Take the 2-minute tour ×

I am trying to load page dynamically in jquery mobile by calling IM.bindClick() function, defined below. Well, it is not a complete one because it always open test1.html

Everything looks good in Safari (except that after running a few times, the back button will move to the "back" page, and continue by itself to current page).

In iPhone emulator, it seems worse ~ since above mentioned problem will observe right away. And on top of it, the "clicked" link was stuck in "highlighted" background color (i.e. blue background and white font) always, once clicked.

Is there anything wrong with below code?

IM.bindClick = function(page){
    jQuery('#'+ page +' div[data-role=content] a').bind('click', function(e) {
    var hyperlink = "/docs/test.html";
    IM.mobile.changePage(IM.ROOT + hyperlink, "pop");
    return false;

Let me know if you have better idea..

Thanks, iwan

share|improve this question
sorry, it was my fault to call bindClick multiple times. –  iwan Jul 17 '11 at 16:09
add comment

1 Answer

sorry, it was my fault to call bindClick multiple times. as for the sticky CSS, it is an existing jqm bug -- workaround is to rebuild the link while showing the page or remove the css using jquery upon page is hidden

share|improve this answer
add comment

Your Answer


