Sfoglia il codice sorgente

主页点击项目后的明细显示脚本

chenwen 3 anni fa
parent
commit
8227f9c132
1 ha cambiato i file con 14 aggiunte e 0 eliminazioni
  1. 14 0
      assets/js/landingpage_details.js

+ 14 - 0
assets/js/landingpage_details.js

@@ -0,0 +1,14 @@
+$(function(){
+	
+	$(".like-icon").on("click",function(evn){
+		let src=$(this).prop("src");
+		
+		$(this).prop("src",src.indexOf('unlike')>=0?src.replace('unlike','like'):src.replace('like','unlike'));
+	});
+	
+	$.getJSON("../../assets/js/landingpage_photos.json", function (data) {
+		const tmphtml=template("flow-photos",{photos:data});
+		
+		$("#project-photo-row").append(tmphtml);
+	});
+});