$('<input class="btn" type="button" value="[[[send]]]" title="" />').insertAfter('#something');
When I include this input element from js to html, I am using single quotes('). If you see value attribute value="[[[send]]]" I have used brackets for localization. If the translated language contains single quotes(french, italian) I am getting ')'missing error in script.
EX: $('<input class="btn" type="button" value="send'vara" title="" />').insertAfter('#something');
Is there any option to include input element without using single quotes ? or Is there any other representation for single quotes in JS ?
att()chaining function:$('<button>').attr({ class: "btn" value: "...", title: "..."}).insertAfter...etc. Also if you need a button, use a button. input type=button doesn't add anything to a form; its value can't contribute to the form post, it's just "a button", so be semantic about that.$("<input class='btn' type='button' value='[[[send]]]' title='' />").insertAfter("#something");