Jump to content

lovelmark

Members
  • Content Count

    2
  • Joined

  • Last visited

Community Reputation

0 Neutral

About lovelmark

  • Rank
    Newbie

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Basically $ is an alias of jQuery() so when you try to call/access it before declaring the function, it will endup throwing this $ is not defined error . This usually indicates that jQuery is not loaded and JavaScript does not recognize the $. Even with $(document).ready , $ is still going to be undefined because jquery hasn't loaded yet. To solve this error: Load the jQuery library at the beginning of all your javascript files/scripts which uses $ or jQuery, so that $ can be identified in scripts . There can be multiple other reasons for this issue: Path to jQuery library you included is not correct The jQuery library file is corrupted Working offline Conflict with Other Libraries
  2. javascript:void(0) is not a very critical error, it sure is an irritating to encounter. When you encounter the javascript:void(0) error it most probably is an indication of an error stemming from your browser; which in turn blocks you from accessing a particular website. The root cause of the error can be traced to a resident pop up blocker in your internet browser. Also, it may be triggered by a proxy server if you are connecting to the internet through proxy. The void operator evaluates the given expression and then returns undefined. If you have pass 0 as the unary expression operand to the void operator, JavaScript coerces 0 to "false" and returns, but void doesn't care and simply returns undefined, which means "do nothing" . Put them together and you have composed a way to programmatically "do nothing" when a link is clicked. JavaScript Void(0) is often used when, inserting an expression into a web page may produce an unwanted side-effect.
×
×
  • Create New...