I have a code that checks if both fields have the same value:
$ampD.blur(function() {
setInterval(update, 1000);
function update() {
if ($('input#autocompletegoogle').attr('value') == $('input#field-address').attr('value')) {
$ampD.attr('style', '');
} else {
$ampD.attr('style', 'border: 1px solid #f00!important;background: #ffefef !important');
}
But sometimes $('input#autocompletegoogle')
contains additionals marks example:
"5611JM Eindhoven, Netherlands"
but input#field-address contains "Eindhoven, Netherlands"
and I get false.
How can I check in whether $('input#autocompletegoogle') contains value from $('input#field-address')?
I tried to find the solution almost one hour... I could find right information. Somone could help me?
No comments:
Post a Comment