Skip to content

Instantly share code, notes, and snippets.

@LinZap
Created April 9, 2015 13:06
Show Gist options
  • Select an option

  • Save LinZap/f7af3c5ccb41d25fcb04 to your computer and use it in GitHub Desktop.

Select an option

Save LinZap/f7af3c5ccb41d25fcb04 to your computer and use it in GitHub Desktop.
// EJS 中: <div ejs="@bulid_urlitem"> </div>
// tar 會從外部傳 該 tag 近來
function bulid_urlitem(tar){
var cid = tar.attr('cid');
api({did:4,cid:cid,limitnum:9},function(data){
render({
ejs:'views/urlitem',
data:data,
//這裡直接告訴 ejs 把畫面放進這個 div
target:tar
});
});
}
// 該 function 會自動幫你 run
@LinZap
Copy link
Copy Markdown
Author

LinZap commented Apr 9, 2015

At app.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment