I changed my code to below code but this code doesnt make anything, no changing, no displaying:
jQuery(function ($) {
if( $(".ea-standard form div").hasClass("disabled") ){
alert($(".ea-standard form div").hasClass("disabled"));
$('.disabled').hide();
} } );
jQuery(function ($) {
$(".ea-standard form div.disabled").alert($(".ea-standard form div").hasClass("disabled"));
} );
jQuery(function ($) {
$(".ea-standard form div.disabled").hide();
} );
why?
I have a form and when you select an option on a selectable list, other selectable lists on the form get ".disabled" form.But the disabled class doesnt disable them.
to disabled other selectable lists, I want to hide all things which has ".disable" class.
to make this, I wrote this code:
jQuery(function ($) {
$(".ea-standard form div").hasClass(("disabled") => {
alert($(".ea-standard form div").hasClass("disabled"));
$('.disabled').hide();
});
});
I want to check all form div and if any div get ".disabled" class in anytime, hide it suddenly.
but my js code editor says:
Expected an identifier and instead saw "disabled" . for this line:
$(".ea-standard form div").hasClass(("disabled") => {
how to solve?