我需要能夠觸發.live函數中的典型鏈接事件,如下所示。.live函數中觸發href事件
$(".next").live('touchstart', function(event) {
//trigger link event
});
對於典型的href操作有些不同。
我需要能夠觸發.live函數中的典型鏈接事件,如下所示。.live函數中觸發href事件
$(".next").live('touchstart', function(event) {
//trigger link event
});
對於典型的href操作有些不同。
//i assume your href id is 'hrefid'
$(".next").live('touchstart', function(event) {
//trigger link event
$("#hrefid").click();
});
如果你的意思是要導航到一個頁面,你可以這樣做:
$(".next").live('touchstart', function(event) {
//trigger link event
window.location.href = "http://www.google.com";
});
$('.next').live('touchstart', function(event) {
window.location.href = $(this).attr('href');
});