Skip to main content
update wording to avoid controversy
Source Link

It does work I was wondering if this can be wrote more efficientin a simpler fashion?

It does work I was wondering if this can be wrote more efficient?

It does work I was wondering if this can be wrote in a simpler fashion?

Bumped by Community user
Bumped by Community user
Bumped by Community user
Improve wording
Source Link
Peilonrayz
  • 44.6k
  • 7
  • 80
  • 158

Can this Jquery be more efficient? Selecting multiple checkboxes to show similar but different boxes

I have 3 checkbox's with 8 different combinations and outcomes. Click red checkbox it shows a red div. Click the red and green checkbox's and the redgreen div box shows plus hides the red and green div boxes so there's only ever one div box showing.

  • Selecting no checkboxes shows no divs.
  • Selecting one checkbox shows the colored div.
    For example; clicking the red checkbox.
  • Selecting two checkboxes shows the color1+color2 div. But doesn't show either of the single colored divs.
    For example; clicking the red and green checkboxes shows the redgreen div. But ensures both the red and green div boxes are hidden so there's only ever one div box showing.
  • Selecting all the checkboxes shows the rgb div. And doesn't show any other divs.

It does work I was wondering if this can be wrote more efficient?

Can this Jquery be more efficient?

I have 3 checkbox's with 8 different combinations and outcomes. Click red checkbox it shows a red div. Click the red and green checkbox's and the redgreen div box shows plus hides the red and green div boxes so there's only ever one div box showing. It does work I was wondering if this can be wrote more efficient?

Selecting multiple checkboxes to show similar but different boxes

I have 3 checkbox's with 8 different combinations and outcomes.

  • Selecting no checkboxes shows no divs.
  • Selecting one checkbox shows the colored div.
    For example; clicking the red checkbox.
  • Selecting two checkboxes shows the color1+color2 div. But doesn't show either of the single colored divs.
    For example; clicking the red and green checkboxes shows the redgreen div. But ensures both the red and green div boxes are hidden so there's only ever one div box showing.
  • Selecting all the checkboxes shows the rgb div. And doesn't show any other divs.

It does work I was wondering if this can be wrote more efficient?

added 185 characters in body
Source Link
Lowis
  • 21
  • 2

I have 3 checkbox's with 8 different combinations and outcomes. Click red checkbox it shows a red div. Click the red and green checkbox's and the redgreen div box shows plus hides the red and green div boxes so there's only ever one div box showing. It does work I was wondering if this can be wrote more efficient?

I have 3 checkbox's with 8 different combinations and outcomes. It does work I was wondering if this can be wrote more efficient?

I have 3 checkbox's with 8 different combinations and outcomes. Click red checkbox it shows a red div. Click the red and green checkbox's and the redgreen div box shows plus hides the red and green div boxes so there's only ever one div box showing. It does work I was wondering if this can be wrote more efficient?

deleted 35 characters in body
Source Link
Lowis
  • 21
  • 2
Loading
Source Link
Lowis
  • 21
  • 2
Loading