sean04 Posted April 9, 2010 Share Posted April 9, 2010 How would I go about writing a script where once you hover over an entire fieldset, I little icon appears and says "edit". Link to comment https://forums.phpfreaks.com/topic/198141-hover-over-fieldset-and-link-appears/ Share on other sites More sharing options...
JustLikeIcarus Posted April 9, 2010 Share Posted April 9, 2010 One way would be to use jquery and do something like this. $("fieldset").hover( function () { $(this).find(".edit_link").show(); }, function () { $(this).find(".edit_link").hide(); } ); Link to comment https://forums.phpfreaks.com/topic/198141-hover-over-fieldset-and-link-appears/#findComment-1039616 Share on other sites More sharing options...
sean04 Posted April 9, 2010 Author Share Posted April 9, 2010 Thanks! and what exactly would .edit_link be? Link to comment https://forums.phpfreaks.com/topic/198141-hover-over-fieldset-and-link-appears/#findComment-1039621 Share on other sites More sharing options...
JustLikeIcarus Posted April 9, 2010 Share Posted April 9, 2010 In this example you would give that class to whatever element you want to show/hide. Link to comment https://forums.phpfreaks.com/topic/198141-hover-over-fieldset-and-link-appears/#findComment-1039624 Share on other sites More sharing options...
sean04 Posted April 9, 2010 Author Share Posted April 9, 2010 Like a stylesheet class? or like <div class = "edit"><a href = "...">EDIT</a></div> Sorry, I'm not to familiar with it. Link to comment https://forums.phpfreaks.com/topic/198141-hover-over-fieldset-and-link-appears/#findComment-1039630 Share on other sites More sharing options...
JustLikeIcarus Posted April 9, 2010 Share Posted April 9, 2010 Its a class like in css. Just give your element class="edit_link" or whatever. Take a look at the jquery website, you'll get the hang of it pretty quickly. Link to comment https://forums.phpfreaks.com/topic/198141-hover-over-fieldset-and-link-appears/#findComment-1039658 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.