I have one simple code :
$(document).ready(function(){
$(".button").click(function(){
var f = $(this).closest('form');
if(f != null){
$(f).append('<div class="loadmask"></div>');
}
});
});
as you can see, I want to append a div with class 'loadmask' to the parent form. The strange thing here $(f).append('<div class="loadmask"></div>'); had been encoded to $(f).append("<div class="loadmask"></div>"); and throws a javascript error.
UPDATE:
I have change my code to
$(document).ready(function(){
$(".button").click(function(){
$(this).parent('form').append("<div class='loadmask'></div>");
});
});
still get javascript error:
SyntaxError: missing ) after argument list
[Break On This Error]
$(this).parent('form').append("<div class="loadmask"></div>");
and at eclipse console:
00:57:17,593 ERROR [MinifierUtil:108] 22: 65: missing ) after argument list
00:57:17,593 ERROR [MinifierUtil:108] 22: 79: unterminated string literal
00:57:17,593 ERROR [MinifierUtil:108] 1: 0: Compilation produced 2 syntax errors.
00:57:17,593 ERROR [MinifierUtil:74] JavaScript Minifier failed for
$(document).ready(function(){
$(".button").click(function(){
$(this).parent('form').append("<div class="loadmask"></div>");
});
});
I use eclipse Juno (ecoding project with UTF-8), liferay 6.1 ga-1 and jsf-2.0, icefaces-3 ....
'. Did you copy paste it from somewhere? " translates to "