0
我在我的Wordress網站raigle.net中使用jQM。我需要禁用AJAX。我怎麼能這樣做,知道jQM加載在functions.php中?禁用AJAX頁面在Wordpress中鏈接jQuery Mobile
這是我的代碼整合JQM:
function custom_theme_files() {
wp_enqueue_script('jquery');
}
/* Incorporating jQuery Mobile */
function get_jqm() {
wp_enqueue_script(
'jqm_js',
'http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js',
array('jquery'),
'1.3.2'
);
wp_register_style(
'jqm_css',
'http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css',
'',
'1.3.2'
);
wp_enqueue_style(
'jqm_css',
'http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css',
'',
'1.3.2'
);
}
add_action('wp_enqueue_scripts', 'get_jqm');
我知道,無論如何我應包括在這之前的原始HTML(從here):
<script type="text/javascript">
$(document).bind("mobileinit", function() {
$.mobile.ajaxEnabled = false;
});
</script>
我該怎麼辦,在WordPress的樣式?
謝謝您的評論! – artildo