2012-04-25 18 views
2

を使用してmのとき、私は、エラーjqueryのが定義されていない取得しています定義されていない...私を助けてください..jqueryのは、私は

jQuery(function(){ 
      jQuery('#submitid').click(function(){ 
       if(jQuery('input[id="EnrollmentServiceAddress1"]').val() != ''){ 
        var add2 = jQuery('input[id="EnrollmentServiceAddress2"]').val(); 
        if(add2.indexOf('#', 0) && add2 != ''){ 
         jQuery('input[id="EnrollmentServiceAddress2"]').val('#'+add2); 
        } 
       } 
       QadServer.current.submit("#EnrollmentServiceInformationForm"); 
      }); 

      jQuery('input[name="residence_type"]').click(function() { 
       if(jQuery('input[name="residence_type"]:checked').val() == 'home') { 
        //   jQuery('#add_type').html('Home Number'); 
        jQuery('#home_apt').slideUp('slow'); 
       } else if(jQuery('input[name="residence_type"]:checked').val() == 'apartment') { 
        jQuery('#add_type').html('Apartment Number'); 
        jQuery('#home_apt').slideDown('slow'); 
       } 
      }); 

      jQuery('.qad_suggestion').live('click',function() { 
       qad_test(); 
      }); 

      jQuery('div[id="change_add"] > span').click(function() { 
       jQuery('input[id="EnrollmentServiceAddress1"]').val(''); 
       jQuery('input[name="residence_type"]:checked').attr('checked', false); 
       jQuery('#home_apt').hide(); 
       jQuery('#change_add').slideUp('slow', function() { 
        jQuery('#validate_add_block').slideDown('slow'); 
       }); 
      }); 

    <?php if($this->Session->check('Enrollment.social_security_number')) { ?> 
       //  jQuery('#validate_add_block').hide(); //Old code 
       //  jQuery('#change_add').show(); 
       jQuery('#validate_add_block').show(); //New code 
       jQuery('#change_add').hide(); 
    <?php } ?> 
       init(); 
      }); 
+0

あなたのビューファイルでこれを試してみてくださいあなたはjqueryの参照URLを追加する必要がありますか? あなたの頭にこのリンクを追加してください。

+0

チェックするべき事柄のカップルです:1.あなたの '

0

あなたはjQueryのを含めることがありますか?あなたのjqueryのコードの先頭に次の行を入れて

<script type="text/javascript" src="jquery.js"></script> 

または

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> 

http://docs.jquery.com/Tutorials:Getting_Started_with_jQuery

+0

はい、私は含まれています... –

+0

それはまだ良いですがまだ何かが間違っていたので、もしそれが含まれていればjQueryが定義されていますので、404、スペルミス、小文字をチェックしてください... – PiTheNumber

1

jQuery.noConflict(); 
2

は他

jQuery.noConflict() 

$ with jQueryを交換しようとしてみてください。

+0

thanksssssssssss –

+0

あなたはこの回答がhelpfylあなたはそれを投票してください..thanks –

+0

実際にはこれは私のために働いていない...私は貴重な時間のためのお礼...とコメント –

0


<?php $this->Js->JqueryEngine->jQueryObject = 'jQuery'; ?>

関連する問題