jQuery if not exist
This means "if exist"
if($.cookie("movies_list")) {开发者_JAVA技巧
// do something
}
How to write "if not exist" without changing the structure?
Prepend the not operator !
if(! $.cookie("movies_list")) {
// do something
}
! Operator
精彩评论