2011-06-02 79 views
2

用自動縮進編寫代碼塊。無需人工黏合...phpstorm javascript autoindent問題

$(document).ready(function() { 
     $("#welc").toggle(function() { 
      $(this).val("hello"); 
     }, function() { 
        $(this).val('hell'); 
       }); 
    }); 
</script> 

得到了這樣的結果,但它應該是這樣的:

<script type="text/javascript"> 
    $(document).ready(function() { 
     $("#welc").toggle(function() { 
      $(this).val("hello"); 
     }, function() { 
      $(this).val('hell'); 
     }); 
    }); 
</script> 

的錯誤還是我失去了一些東西?

回答

0

check this issue。應在2.1.1或下一次更新中解決。

+0

CrazyCoder,也沒有自動完成支持jQuery中的匿名函數,所以我需要關閉大括號我的自我。請查找這也。 – matiasdelgado 2011-06-03 12:20:34