[問題] 請教PHP問題(FB取圖)

看板Programming作者 (行人)時間11年前 (2013/10/18 17:40), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
---代PO--- 小妹是資傳系的, 最近為了畢業專題自學Php遇到一些問題, 主要是想要點擊時間軸(http://almende.github.io/chap-links-library/timeline.html ) 裡從臉書裡抓取到的照片, 然後照片便可以放大或縮小出現在時間軸下面的空白處, 但是可以點擊圖片,圖片卻沒出現在時間軸下面的空白處。 //點擊照片,照片便可出現在時間軸下面的空白處。 $("document").ready(function() { $("time img").click(function()//點擊時間軸裡的臉書照片 { $("time img").removeClass("focus"); $(this).addClass("focus");//把時間軸裡的照片放到下面空白處 $("picture img").attr("src",$(this).attr("src")); //在空白處顯示出時間軸的照片 }); $("time").hover(function(){ $("picture img").css({ "transform":"scale(0.9)", "-webkit-transform":"scale(1.0)" }); },function(){ $("picture img").css({ "transform":"scale(1.2)", "-webkit-transform":"scale(1.0)" }); }); }); //時間軸的部分,可以抓取到臉書的個人資料(照片和時間) function drawVisualization() { // Create and populate a data table. data = new google.visualization.DataTable(); data.addColumn('datetime', 'start'); data.addColumn('datetime', 'end'); data.addColumn('string', 'content'); data.addRows([ <? foreach($_SESSION['getphoto'] as $pic){ $time_new =substr($pic['created_time'],0,4).", ".substr($pic['created_time'],5,2).", ".substr($pic['created_time'],8,2);?> [new Date(<? echo $time_new;?>), , '<div><? echo $time_new;?></div><time> <img src="<? echo $pic['picture'];?>"></time>'], <? } ?> //[new Date(2011, 02, 04, 12, 00, 00), , '<div>Report</div><img src="../examples/img/attachment-icon.png" style="width:32px; height:32px;">'] ]); // specify options var options = { width: "100%", editable: true, // enable dragging and editing events enableKeys: true, axisOnTop: false, showNavigation: true, showButtonNew: true, animate: true, animateZoom: true, layout: "box" }; timeline = new links.Timeline(document.getElementById('mytimeline')); timeline.draw(data, options); } //空白處 <picture> <img></img> </picture> ------ 想請問各位版眾是否能看出些端倪, 或有人願意現場指點的話可回信商談, 小妹可以請他吃個午飯 >"< 感謝好心人~ btw, 帳號是我哥的,希望大家不要亂他... -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 192.192.154.49 ghkckhg:轉錄至看板 PHP 10/18 17:44
文章代碼(AID): #1IOG8KKN (Programming)
文章代碼(AID): #1IOG8KKN (Programming)