Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: loading image and checkbox
10-14-2010, 08:20 AM #1
- Join Date
- Feb 2010
- God's Own Country
- Thanked 0 Times in 0 Posts
loading image and checkbox
I want a loading image to be displayed while I am checking a checkbox. The loader image should be at exact position as the checkbox is. I have placed a loading image in my page, but it gets displayed at the centre. I want to know how to display the image at the position of checked checkbox..Is it a simple thing? Or Is it complicated one. I have no idea. I feel that for the purpose we have to take the postion of mouse pointer..Am I correct..If someone has an exact solution..please help with an answer.
10-14-2010, 10:19 AM #2
- Join Date
- Feb 2009
- Ilkley, West Yorkshire, UK
- Thanked 727 Times in 721 Posts
Mouse position is no good, because the mouse could be anywhere on the screen.
If your markup is something like:
and your event is firing when the checkbox is ticked, then you could introduce the image within the parent <label> tag, and position it appropriately from there.Code:<label id="mycheckbox"><input type="checkbox"></label>