Using jquery is it better to create a DOM element like this:-
function create(options)
{
$('<form action="' + options.action + '"></form>');
}
Or like this:
function create(options)
{
$form = $('<form></form>');
$form.attr('action',options.action);
}
This may be a matter of opinion. I feel that the second way gives more clarity but I suspect it is less efficient...