Jquery / Javascript - Uncaught TypeError: undefined is not a function -


Google does not execute my JS code Everything works fine in Firefox

  $ ('a [href = "# pricend"]) Click (function () ($ ("div.text_1"). Text (($ ("Div.text_1"). Text () == 'smth1') 'smth2': 'smth1') $ ("div. text ("$ (" div.text_2 "). Text () = = 'Smth2') 'smth1': 'smth2') if ($ ('div.text_1'). "smth1")) {// smth here}   

The Chrome console output indicates the "if" line above.

Uncaught TypeError: Undefined Any No function (anonymous function) f.event.dispatch jquery-1.7.2.min.js: 3h.handle.i

How to fix it? Now anything in mind No, does the name work and before you can compare it? < p>

You can not call. () contains the returned text value from Text ().

If you value You should be fine after you remove it from jQuery.

  var divText = $ ('div.text_1'). Text (); if (divText.indexOf ("smth1" ) = -1) {// your stuff ...}    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -