Hi,
is it better to do this (regarding performance not readability):
$('a.updateCartButton').click(function() {
$('form[name=updateCartForm]').attr('action', $(this).attr('href')+'#'+
$('img[id^=iconUpdateArticle]').attr('id')).submit();
return false;
});
or this:
$('a.updateCartButton').click(function() {
var actionHref = $(this).attr('href');
var buttonId = $('img[id^=iconUpdateArticle]').attr('id');
$('form[name="updateCartForm"]').attr('action', actionHref + '#'
+buttonId).submit();
return false;
});
Maybe someone could also explain to me how I can write a test case for
this in jQuery Tester? Then I don't have to ask questions like this in
the future... ;)
Thanks!