2011-07-08 13 views
0

私は店のjqueryの日付ピッカーに要素の入力テキストボックスを作成するためにJavaScriptましたが、それは:(このelemenが作成したときにOnclick jqueryのイベントを呼び出す方法jQueryの日付ピッカーイベント

jQuery(document).ready(function($) { 
     $("#pohdddt").datepicker({showOtherMonths: true,selectOtherMonths: true,dateFormat: 'dd.mm.yy',showOn: 'button',buttonImage: "<?php echo base_url()?>icons/cal.gif", buttonImageOnly: true, showAnim: 'slideDown', duration: 'fast'}); 
}); 


var cell = document.createElement("td"); 
    var theInput = document.createElement('input'); 
    var img = document.createElement('img'); 
    img.setAttribute('alt', 'select date '); 
      img.setAttribute('class', 'ui-datepicker-trigger'); 
      img.setAttribute('src',base_url_no_index+'icons/cal.gif'); 

      theInput.setAttribute('id', 'pohdddt'+i); 
      theInput.setAttribute('name', 'pohdddt'); 
      theInput.setAttribute('value', '<?php echo date('d.m.Y'); ?>'); 
      theInput.setAttribute('size', '10'); 
      theInput.setAttribute('class','hasDatepicker'); 

      cell.appendChild(theInput); 
      cell.appendChild(img); 
      row.appendChild(cell); 

動作しない? もしそうなら、私は=のdocument.createElement( 'A')AHREF VARを作成します。

どれ提案
Rizq

0になる前に

おかげ?すべてのためのjQueryを使用していないのはなぜ完全な情報のため

+1

を通過しますか? – alex

+0

要求を満たすために – MRizq

+0

それは何ですか?ライブラリを使用できますが、コードの30%しか使用できません。 – alex

答えて

0
$('#target').click(function() { 
    alert('Handler for .click() called.'); 
}); 

htmlコード

<div id="other"> 
    Trigger the handler 
</div> 

http://api.jquery.com/click/

関連する問題