Enable & Disable a Div and its elements in Javascript [duplicate]

You should be able to set these via the attr() or prop() functions in jQuery as shown below: jQuery (< 1.7): // This will disable just the div $(“#dcacl”).attr(‘disabled’,’disabled’); or // This will disable everything contained in the div $(“#dcacl”).children().attr(“disabled”,”disabled”); jQuery (>= 1.7): // This will disable just the div $(“#dcacl”).prop(‘disabled’,true); or // This will … Read more

For div to extend full height

Did you remember setting the height of the html and body tags in your CSS? This is generally how I’ve gotten DIVs to extend to full height: <html> <head> <style type=”text/css”> html,body { height: 100%; margin: 0px; padding: 0px; } #full { background: #0f0; height: 100% } </style> </head> <body> <div id=”full”> </div> </body> </html>

CSS: Hover one element, effect for multiple elements?

You don’t need JavaScript for this. Some CSS would do it. Here is an example: <html> <style type=”text/css”> .section { background:#ccc; } .layer { background:#ddd; } .section:hover img { border:2px solid #333; } .section:hover .layer { border:2px solid #F90; } </style> </head> <body> <div class=”section”> <img src=”https://stackoverflow.com/questions/1462360/myImage.jpg” /> <div class=”layer”>Lorem Ipsum</div> </div> </body> </html>

HTML: Is it possible to have a FORM tag in each TABLE ROW in a XHTML valid way?

It’s worth mentioning that this is possible in HTML5, using the “form” attribute for input elements: <table> <tr> <td>Id</td> <td>Name</td> <td>Description</td> <td>&nbsp;</td> </tr> <tr> <td><form id=”form1″><input type=”hidden” name=”id” value=”1″ /></form></td> <td><input form=”form1″ type=”text” name=”name” value=”Name” /></td> <td><input form=”form1″ type=”text” name=”description” value=”Description” /></td> <td><input form=”form1″ type=”submit” value=”Save” /></td> </tr> <tr> <td><form id=”form2″><input type=”hidden” name=”id” value=”1″ /></form></td> … Read more