输入banner图图片脚本导航/分类

jquery检测元素是否存在的实例代码_javascript技巧

if ($('#myDiv).length) {
// your code
}

Simple, but not obvious.