Why cant Dollar symbol be used as an alternative fo jQuery in Wordpress?

前端 未结 3 871
难免孤独
难免孤独 2020-12-17 22:27

Why can\'t we use \"$\" instead if jQuery in wordpress? Usually \"$\" is the alternative of jQuery right? But in Wordpress it shows \"$\" is not a function.

3条回答
  •  南方客
    南方客 (楼主)
    2020-12-17 22:42

    jQuery(...) should be used instead of $(...)

    Edit ---- sorry, i misread your question. It depends on the jquery implementation of your wordpress version. I have seen wordpress sites that allowed the usage of $ before, but i don't really know what it depends on.

提交回复
热议问题