parents( expr ) http://docs.jquery.com/API/1.1/DOM/Traversing Get a set of elements containing the unique ancestors of the matched set of elements (except for the root element). Can be filtered with an optional expressions. Return value: jQueryParameters: expr (String): (optional) An expression to filter the ancestors with appendTo( content ) 網址: http://docs.jquery.com/Manipulation/appendTo show( speed, callback ) Returns: jQuery Show all matched elements using a graceful animation and firing an optional callback after completion. hide( ) Hides each of the set of matched elements if they are shown. Same as hide( speed, [callback] ) without animations. Doesn't change anything if the selected elements are all hidden. Demo : View SourceHides all paragraphs then the link on click. $("p").hide(); $("a").click(function () { $(this).hide(); return false; }); EFFECTS/ELEMENATE http://docs.jquery.com/Effects/animate#paramsdurationeasingcallback animate( params, [duration], [easing], [callback] ) DemoView SourceShows a div animate with a relative move. Click several times on the buttons to see the relative animations queued up. $("#right").click(function(){ $(".block").animate({"left": "+=50px"}, "slow"); }); $("#left").click(function(){ $(".block").animate({"left": "-=50px"}, "slow"); }); 希望能寫出可以拖拉但本身不會被移走的圖片

但這樣無法得到下方圖片的名稱也就無法進行刪除。因此,參照JQuery方法後做出: (其實這裡面的每個參數函數用法等都讓我花了好多時間去弄懂="=)

但這種方法會把上面的圖片刪掉。挨。遇到這種怎麼改也改不好的瓶頸,只好繼續上網找資料。 用"drag and drop example"關鍵字在YAHOO搜尋到的不錯網站: 1。這是一個很多jQuery範例的網站 http://www.sastgroup.com/jquery/240-plugins-jquery

amy5259 發表在 痞客邦 PIXNET 留言(1) 人氣()


留言列表 (1)

發表留言
  • mosquito
  • jquery

    找jquery的資料剛好看到你的網誌,如果你是唸商的,那你還真是蠻厲害的:)

    Regards.
    Mosuqito
  • 因為是念資訊與財金~之前有碰過^^

    amy5259 於 2010/10/02 19:36 回覆