var inputvalue = $(this).attr('value')
$('input[value=inputvalue] + label').css({
'-webkit-transition': 'opacity 0.4s linear',
'opacity': '0'
});
But it does not work. As expected value=inputvalue does not get that variable but looks for that name. How can i do this?
Thanks a lot :)
$(this).val()instead of$(this).attr('value')? Oh, and the attribute-equals selector requires the values to be quoted. 'Quotes are mandatory.' Reference:val(), attribute-equals selector.