2012-09-24 68 views
0

在我ST2的應用程序我有的index.html無法在煎茶觸摸2個應用程序

<script id="jquery" type="text/javascript" src="resources/js/jquery-1.8.2.js"></script> 
<script id="masonry" type="text/javascript" src="resources/js/masonry-2.1.5.js"></script> 

以及

<script> 

$(document).ready(function(){ 
    var $container = $('.x-list-container');    
    $container.imagesLoaded(function(){     
     $container.masonry({ 
     itemSelector: '.x-list-item', 
     }); 
    }); 
}); 

</script> 

我上的應用程序頭版運行jQuery的砌體一個列表所以它包裝元素作爲這樣

<div class="x-list-container"> 
    <div class="x-list-item"></div> // 'x-list-item' is the block I want to float 
    <div class="x-list-item"></div> 
    ... 
</div> 

然而,一旦一切都加載,我檢查.x-list-item沒有style定位div。我在普通網絡應用程序上使用砌體的經驗,但不能使它在這裏工作。

這就像砌體沒有運行。

它被加載(網絡選項卡上選中)和jQuery被加載(網絡選項卡上,並使用if (jQuery) {alert('hey there');測試。

任何想法,我做錯了嗎? }

回答

0

煎茶觸摸將不能支持混合Jquery的一個應用程序。

Reason from forum's sencha moderator

+0

這很奇怪。我同時使用jQuery的(我需要它使用的SoundCloud的播放器)和ST2在一個應用程序,一切都工作得很好。 –

+0

你可以告訴我一個例子,因爲我已經嘗試過1次在index.html中包含我的jquery庫。我可以從那時開始運行的唯一功能就是提醒你,沒有其他更多的東西了。 – Eli

+0

有趣 - @TDeBailleul,是我的設置好嗎?你對如何實施它有什麼建議嗎? – pepe