We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

HTML puzzles about click event to enable and disable outline

Home Forums Puzzles HTML puzzles about click event to enable and disable outline

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #61442
    yijin
    Customer

    I want to use the HTML element click event to make the outline enable of the cap panel,else it will disable.

    Now,the outline can be enable,but can’t be disable.

    Please check my puzzle, where is the mistake, thank you!

    Attachments:
    You must be logged in to view attached files.
    #61448
    kdv
    Participant

    Your logic ALWAYS enables outlines.

    Use variables.

    Puzzles and JS coding. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.

    #61455
    yijin
    Customer

    Thanks for your replay.

    I modified the puzzle according to your tips:

    When I click “Back Left Panel” on the webpage, Outline is enbale, when I click it again, Outline is disable.

    I need: when I click the “Back Left Panel” on the webpage, the back left panel of cap’s outline is enable, when I click the “Back Right Panel” on the webpage, the back right panel of cap’s outline is enbale, at same time another panels of cap’s outline is disbale.

    Please tell me how do i do? thanks.

    Attachments:
    You must be logged in to view attached files.
    #61463
    kdv
    Participant

    Continue using variables and logic. Save the outlined object’s name to a variable. Compare names of objects with this variable before making them outlined.

    Puzzles and JS coding. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.

    #61464
    Pandern
    Customer

    What I usually do is insert a ‘outline disable for’ ‘all objects’ before the logic puzzle enables it again for the correct object.

    Kdv’s suggestion might be a better solution for your situation though

    • This reply was modified 1 year, 7 months ago by Pandern.
    Attachments:
    You must be logged in to view attached files.
    #61467
    yijin
    Customer

    Thanks Pandern, your suggestion is good, very close to my idea,thank you very much. :good:

    Thanks Kdv, i think your suggestion might be better, could you give me a sample? :yes:

    #61504
    kdv
    Participant

    The logic is simplest

    https://v3d.net/gsq

    Puzzles and JS coding. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.