2013-11-02 65 views
0

不知道爲什麼這個jquery ui不能在firefox上工作,但是在chrome see here!!中工作。 還當我在Firefox這個本地運行正常工作任何人可以建議什麼是我的代碼是Jquery-ui在Firefox的localhost上正常工作,但不在服務器上?

HTML

<div class="option" id="f" style="display:inline-block;"> 
    <img class="options" src="http://lorempixel.com/90/90/" alt=""/> 
</div> 
<br> 
<div class="lame" style="display:inline-block;"> 
    <img src="http://placehold.it/350x150" alt=""/> 
</div> 

jQuery的

$(function() { 
    $(".option").draggable({ cursor: "pointer",opacity: 0.6,helper: "clone"}); 
    $(".lame").droppable({ 
     accept:".option",drop: function(event, ui) { 
      $.ui.ddmanager.current.cancelHelperRemoval = true; 
      $(ui.helper).draggable({cursor : "pointer",opacity: 0.6,containment :".lame"}); 
      $(ui.helper).find('.options').resizable({containment : ".lame"}); 
     } 
    }); 
}); 
+0

什麼不起作用? – melancia

回答

1

的問題,我想這是因爲Chrome在你的CSS和JS路徑中原諒你不正確的斜槓(它們應該是正斜槓,而不是反斜槓),而Firefox不是。在嘗試加載CSS和JS文件時,Firefox給出'404 Not Found'錯誤。

p.s.當你在本地運行它時,你可能使用file://協議而不是運行你自己的web服務器,在這種情況下,Firefox會很樂意允許反斜槓。

相關問題