if ($(selector).length)//该片段来自于http://www.codesnippet.cn/detail/150720134584.html
来源: http://www.codesnippet.cn/detail/150720134584.html