Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Checkbox check should automatically and slowly fadeout to unchecked

Checkbox check should automatically and slowly fadeout to unchecked

Scheduled Pinned Locked Moved Web Development
csharphtmltools
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 9329780
    wrote on last edited by
    #1

    I have created a elevator functionality [there are 2 floors and corresponding to each one , there is a checkbox. Depending upon which checkbox is checked, the elevator should move to that floor. Only thing which i am not able to implement here is: Make the checkbox check automatically and slowly fadeout to unchecked state when the orange elevator has reached that checkbox. Here is the link to the markup and script: http://jsfiddle.net/hurricaneankit/qR4uJ/

    M J 2 Replies Last reply
    0
    • U User 9329780

      I have created a elevator functionality [there are 2 floors and corresponding to each one , there is a checkbox. Depending upon which checkbox is checked, the elevator should move to that floor. Only thing which i am not able to implement here is: Make the checkbox check automatically and slowly fadeout to unchecked state when the orange elevator has reached that checkbox. Here is the link to the markup and script: http://jsfiddle.net/hurricaneankit/qR4uJ/

      M Offline
      M Offline
      Martin OHV
      wrote on last edited by
      #2

      Hmmm... i would use a loop (for / next) to change the Color from yellow to the background in small steps and the opposite way to fade it in on the other box... Martin

      1 Reply Last reply
      0
      • U User 9329780

        I have created a elevator functionality [there are 2 floors and corresponding to each one , there is a checkbox. Depending upon which checkbox is checked, the elevator should move to that floor. Only thing which i am not able to implement here is: Make the checkbox check automatically and slowly fadeout to unchecked state when the orange elevator has reached that checkbox. Here is the link to the markup and script: http://jsfiddle.net/hurricaneankit/qR4uJ/

        J Offline
        J Offline
        Jasmine2501
        wrote on last edited by
        #3

        For your animate() function, you can pass in a function to execute when the animation is completed. You can't "fade" your checkbox, but you can un-check it.

        $(function(){
        $(document).ready(function () {
        $("#check1").click(function () {
        $("#check1").toggleClass('checked');
        $("#check2").removeClass('checked');
        $("#groundDiv").animate({
        "top": "0px"
        }, 1000, function () {
        //put code here to un-check the box
        });
        });
        });

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups