javascript - jQuery - TypeError: "".match is not a function -
(function( $ ) { $(function() { $( '.addrow' ).delegate( 'click', function() { var $this = $( ), $tbody = $this.parents( '.tbody' ); $tbody.find( 'td:nth-child(-2)' ).css( 'background', 'red' ); }); }); })( jquery );
i'm getting following error :
timestamp: 07/08/2013 21:02:49 error: typeerror: "".match not function source file: file:///c:/program%20files/wamp/www/kbd-creator/v5/jquery-1.10.2.min.js line: 5
i tried changing .delegate .on , error doesn't appear anymore. doing wrong .delegate ?
you're missing parameter .delegate()
. should use .on()
anyway, though note if call 2 parameters it's not going delegated handler setup.
Comments
Post a Comment