Show JavaScript widget only on index/main page?
I tried to integrate Twitter (via JavaScript widget) into a (static) blog page; now it shows up everywhere. Is it possible to show it only on the main 开发者_JS百科page and hide it when a visitor reads a sub-page or blog entry?
if(window.location != '/<your main page address>') {
//do sth to hide or do not show
}
精彩评论