开发者

using Jquery and AJAX in cakePHP

Is it posible to use the Jquery library and the AJAX libraries (prototype & ac开发者_如何学Goulo) together in CAKE-PHP? is it going to cause compatibility issues?


Yes it is possible, make sure that you'll use no-conflict object for jQuery or use jQuery instead of $ while using jQuery library.


Yes, possible. Assuming you have prototype.js included in head, you can add this to your template where you need jquery to work:

<?=$javascript->link('jquery-1.4.4.min'); ?>
<script>
jQuery.noConflict();
  jQuery(document).ready(function() {
     /* do something.. */
  }   

</script>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜