javascript child element css

wiskeynew

New Member
I have two classes set in css.dragbox and .removebuttonthe .dragbox is a div and the .removebutton is an button within the divI have multiple dynamically created .dragbox's on the page.how do I make the .removebutton of only that current .dragbox visible with javascript?currently when I hover over one .dragbox, all the .removebuttons become visible for all .dragbox's. I only want the current one to show upheres the css\[code\].dragbox { position:absolute; width:10px; height:25px; padding: 0.0em; margin:25px; } .removebutton{ background-image:url(img/delete.png); background-repeat: no-repeat;visibility:hidden;}\[/code\]and heres the javascript \[code\] $('.dragbox').hover(function() { $(this).css('border', '1px solid #000'); $(this).css('background-image','url(img/move.png)'); $(this).css('background-repeat','no-repeat'); $(this).css('width', '15px'); $(this).css('height', '15px'); $(".removebutton").css('visibility', 'visible'); });\[/code\]
 
Back
Top