How do I change the code below to swipe to the next page/DIV w/o having to write the script for every page change? Ive tried this (@botton) but it moves to every other DIV id
<script type="text/javascript">
$
('div').live("swipeleft", function(){
$
.mobile.changePage("#pg2", "slide", false, true);
});
$
('div').live("swiperight", function(){
$
.mobile.changePage("#pg1", "slide", true, true);
});
</script>