windowsxp — 2010-06-18T23:24:32-04:00 — #1
I have a table row with <div> surrounded.
<input type="button" value="enableDiv" onclick="toggleAlert()" />
I want when page loads , <div> be disabled and when button clicked <div> enabled.
Can JQuery be used here ?how?
benzittlau — 2010-06-21T00:10:26-04:00 — #2
Alternatively, to ensure that the div is hidden when the page first loads you can hide it using the css for your page. If you don't have css for the page you would need to place <style> tags around this codebyte.
fattyjules — 2010-06-21T00:31:55-04:00 — #3
fattyjules — 2010-06-19T01:12:53-04:00 — #4
Change your input to;
<input type="button" value="enableDiv" id="myButton" />
Should work (assuming you already have jQuery loaded).
fattyjules — 2010-06-19T02:35:30-04:00 — #5