mandarīnpīle Posted June 6, 2013 Report Posted June 6, 2013 Ir 10 objekti ar klasi ".active_class." Vienam no tiem ir id "#special_id". Nepieciešams izpildīt animāciju uz visiem objektiem ar klasi ".active_class", kuru id NAV "#special_id". $('.active_class').animate({ // JA objekta id NAV #special_ID backgroundColor: inactive_color_code }); Kā? Vai tam selektoram var kaut kā piekabināt if else konstrukciju? Quote
anonīms Posted June 6, 2013 Report Posted June 6, 2013 (edited) http://api.jquery.com/not-selector/ $('.active_class').not() Edited June 6, 2013 by anonīms Quote
jurchiks Posted June 6, 2013 Report Posted June 6, 2013 (edited) Man kaut kā labāk patiktu viss vienā: $(".active_class:not(#special_id)").animate(...); Bet nu tas ir personal preference. Edited June 6, 2013 by jurchiks Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.