+ 6
Jquery verification
I've an input with a placeholder. In jquery, I want to : if this input's placeholder == "tape here" then ... how can I do ?
3 Respostas
+ 7
var prop = $('input').prop('placeholder');
if(prop == 'something'){
//code here
}
//this way makes your code faster and easier to read
+ 7
if($("el").attr('placeholder') == "txt") {
// ... code
}
+ 5
if($('input').prop('placeholder'))=='tape here'){
}