dgileadi / zepto-page-transitions

HTML5 Page Transitions similar to JQuery Mobile page transitions, but standalone (13k) and using Zepto.js
166 stars 46 forks source link

Trigger events #5

Closed abolinhas closed 11 years ago

abolinhas commented 11 years ago

Hi,

Can you explain how to use the events (eg. pageint)?

I tried use this but don't worked. $("#demos").on('pageinit',function(){ alert("Test"); });

Best regards

dgileadi commented 11 years ago

Created an example for events. In your case if you want 'pageinit' to trigger for the initial page then put the above code before the script include for transition.min.js.

abolinhas commented 11 years ago

Thanks,

I have several pages into one HTML file, it is possible trigger a event per page role ?

$("#page1").on('pageshow',function(){ alert("Test"); });

$("#page2").on('pageshow',function(){ alert("Test"); });

....

Best regards