问题描述:

I already below for JQM page with id page1:

$('#page1').live('pageinit', function(event, data){

});

If I have another JQM page with id page2 and want to have the same pageinit with page1, how to call it or add the event without copying all the code at page1 pageinit event.

网友答案:

$('#page1,#page2') should do the trick.

Pls refer - http://api.jquery.com/multiple-selector/

网友答案:

I think it will be triggered only once in a multi-page template.

See page load events and page change events: http://jquerymobile.com/test/docs/api/events.html

相关阅读:
Top