javascript - Problem with jQuery logic. Need to uncheck one checkbox if other is checked, vice versa -


I got the code below

If a checkbox is checked, then it should be unchecked, And then show a div if another checkbox is checked, then it should uncheck the second and show it to div.

It works in a way, but not the second. I can not work in both ways how to work it.

  $ ('# ssUseDates, #isearchbydate'). $ ('$ IsSearchByDate') ($ ('' Checked '')), {$ ('# ssUseDates'). Remove Entry ('Check'); $ ('# searchDates') $ ('$ SsUseDates') $ $ (' # ssarbidet '). $ (' # Ssarbidote '). Remove etre (' check '); $ (' #SearchDates '). Show ();}   

If I check the #SsUseDates box, then #inSearchByDate box, it works perfectly, unselect the #ssUseDates box, then Showing div. If I check the #isSearchByDate box, then #ssUseDates box, this does not work, this box

I think if ... and ... Your problem has been shared with click () . Try splitting it:

  
  $ (function () {$ ('# AST (' check ')) (Function () {if ($ (this) .attr ("id") == "isSearchByDate" & $ ('# isSearchByDate'). {$ ('#ssUseDates'). RemoveAttre ('Check' ); $ ('#SearchDates'). Show ();} and if ($ (this) .attr ("id") == "ssUseDates" & amp; $ ('#ssUsDates') 'Aster' ('check') ) {$ ('# IsSearchByDate'). Remove Entry ('Check'); $ ('# searchDates'). Show ();}})})    

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -