Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // inlined jquery here, /*! jQuery v1.11.2 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
- // ...
- $(document).ready(function(){
- $('.brainbox').each(function(i){
- // this works fine
- $(this).addClass('item-' + i);
- // logs ok
- console.log( i + ' is here');
- // Uncaught TypeError: Object [object Object] has no method 'getAttribute'
- console.log( $(this).getAttribute('data-key') );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement