kavinhuh
kavinhuh

Reputation: 739

mobile.changePage() not working in ajax

this is my code in jsfiddle http://jsfiddle.net/kavin/5xVZQ/

what i want to get is when i click the image ,it should display options page and hide the image page , the image gets hid but the contents in the options page is not displayed , please help me , thanks in advance

Upvotes: 1

Views: 301

Answers (2)

Nachiket
Nachiket

Reputation: 6187

A simpler and quick fix & no need of javascript code.

<a href='#options'> 
   <img id="option"  src="icons/options.png" width="80px" height="80px"/>  
</a>

Upvotes: 0

elias
elias

Reputation: 161

instead of

$(document).ready(function () {
    $('#option').click(function () {
        $.mobile.changePage($('#options'), 'pop');
        $('#option').hide();

    });
});​

Try

$(document).ready(function () {
    $('#option').click(function () {
        $.mobile.changePage('#options', {transition:'pop'});
        $('#option').hide();

    });
});​

also if the click function doesn't work well, try using bind click instead. It happened to me once and when I used bind it worked.

Upvotes: 1

Related Questions