Monday, 21 April 2014

Object doesn't support property or method 'appendTo'

Object doesn't support property or method 'appendTo'
Root Cause:
Check for jquery.min.js and jQuery.tmpl.min.js
If above files are not loaded add in the reference
Ex:
$("#jqTemplateID").tmpl(ctx.TopTasksSearchResult).appendTo("#DivID");
Make sure #jqTemplateID and #DivID are available in the browser
How to check divs ara available or not
Go to browser
console
Type $('#DivID')
If you get length is not 0, then we are good.