Sunday, 8 September 2013

Not able to insert HTML

Not able to insert HTML

Does anyone see why the $('' line breaks the jQuery below? There's a
jsfiddle here: http://jsfiddle.net/8ZBRP/2/. If you comment out the
$('div') line the code at least compiles and hits the debugger line when
you right-click #box.
$(function() {
$('#box').contextmenu(function(e) {
e.preventDefault();
var document_offset;
debugger;
doc_offset = $(this).offset();
$('<div>').css({width:150px, height:150px});
});
});
Thanks

No comments:

Post a Comment