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