Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript close button

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #194671
    sushant1184
    Participant

    i have sticky footer and i have attached close img on top right of div.
    i want to add close event so that when that close img is clicked then the div closes
    how should i do that

    #194672
    Paulie_D
    Moderator

    What have you tried?

    Can you at least show us the HTML and CSS involved in a Codepen demo.

    Do you want pure Javascript or would a library like JQuery be OK?

    #194675
    sushant1184
    Participant

    http://codepen.io/sushant1184/pen/dPzwQz

    i have this sticky footer with close img on top right.
    i want to add close event so that when someone clicks on that image the section div gets closed

    pure javascript will be ok

    #194700
    Paulie_D
    Moderator

    pure javascript will be ok

    I’m sure it would but we’re not really a ‘write it for you’ site.

    What have you tried?

    If you have trouble getting a function to work then we’re more than happy to help you with it but it’s generally a good idea in these situations to make some effort at working it out for yourself.

    Of course someone here might write something for you for free but if you want to learn..that won’t help you much.

    If you don’t want to learn…hire someone.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.