开发者

Drupal problems with noConflict JQuery

Hi I am trying to make a jquery no conflict work as descriped here: http://drupal.org/node/1058168 I have 开发者_JAVA技巧this in my php template:

<script type="text/javascript">
var $jq = jQuery.noConflict();
</script>

I modified my javascript accordingly. But it does not work... it starts the first function, but then after it, it does not run any of it:

$jq(function () {
    console.info('First $JQ function');
    //"use strict";
    // this function is strict...
    $jq(document).ready(function () {

The $jq(document).ready(function () does not run, hence the whole script stops. The full script is located at www.htconsulting.hu/sites/validation.js

Thank you for your help!

Update:: removing the first $jq(function () did help to at least remove the dougle ready functions. Still it does not solve the problem I faced initially for which I use the noConflict. Part of the code would ensure that based on input thhe input area color changes, as the helper text next to it. The text still does not change. Since in my testing enviroment everything worked, I assumed its because the site I am forced to use, uses old Jquery. Appereantly, using the newer one still does not solve the problem. Form located at www.htconsulting/test/form


$jq(function () {

is equivalent to

$jq(document).ready(function () {

http://api.jquery.com/ready/

So basically you have a document.ready inside of a document.ready. I don't think that works, try removing the inner ready and see if that helps.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜