I am checking for string inside of a div element using jquery but it allways returns the if never the else even when the dom doesn't contain then $ what stupid mistake am i making?
$('.bw-switcher').on('click', function() {
$(this).toggleClass('toggledrate', 1000);
$('.toggledrate > .bwswitch-button:before').toggle('fast');
$('.toggle_rates').toggle('fast');
if ($(".deatils.dailyPrice:contains($)")) {
$('.deatils.dailyPrice').toggle('fast');
console.log('I am the if');
} else {
console.log('I am the else');
$('.deatils.dailyPrice').toggle('fast').prepend('$');
}
$('.toggledrate > .bwswitch-button:after').toggle('fast');
});