2012-12-15 41 views
1

我發現劇本淨這裏FaceBook Style Image Editing jQuery Plugin,但它似乎對被不行如何運營Facebook的樣式圖像編輯jQuery插件

這裏是我的代碼的test.html:

//調用一個jquery

<script type="text/javascript" src="http://localhost/app/js/jquery/jquery-1.6.4.min.js"> 

//調用CSS

<style type="text/css"> 
//css code that obtain from website 
<style> 

//調用一個js應用

<script type="text/javascript"> 
//js code that is obtained from website 
</script> 

//調用應用

</script> 
    $('#albump').editFaceBook();   
</script> 

//添加圖像

<img id ="albump" src="http://localhost/app/imgs/album.gif"> 

我有些事我做錯了?或者這個代碼是錯誤的?

回答

1

您需要添加這個功能齊全

<script type="text/javascript" src="http://localhost/app/js/jquery/jquery-1.6.4.min.js"> 
    <script> 
    $(document).ready(function(){ 
    $("#albump").editFaceBook(); 
    }); 
    <script> 
0

看看您發佈的文檔鏈接的第二行 - 它僅適用於<div>。環繞你的圖像在一個div,並調用該插件:

<div id="albump"> 
    <img src="http://localhost/app/imgs/album.gif" /> 
</div> 

<script type="text/javascript"> 
    $("#albump").editFacebook(); 
</script> 
+0

還是不行! – user1905807

+0

嘗試把腳本放到你頁面頭部的document.ready中:'$(document).ready(function(){$(「#albump」)。editFaceBook();});' – SLD

+0

它的作品現在感謝 – user1905807