How can I zoom the <h3> tagged text when the mouse hovers on them using jQuery?
This is the JavaScript code.
var bindBehaviors = function (scope) {
$('h3',scope).hover(
function () {
$(this).css("font-size", "40px");
},
function () {
$(this).css("font-size", "25px");
}
);
}
bindBehaviors(this);
It is changing its size, but it is happening when I put the mouse anywhere on the row which contains <h3> text. Why?
Another problem is the positioning.
The ASPX code is the following.
<form id="form1" runat="server">
<div id="dictionary">
</div>
<div class="letters">
<div class="button" id="letter-a">
<h3>A</h3>
<button type="button">Load</button>
</div>
<div class="button" id="letter-b">
<h3>B</h3>
<button type="button">Load</button>
</div>
<div class="button" id="letter-c">
<h3>C</h3>
<button type="button">Load</button>
</div>
<div class="button" id="letter-d">
<h3>D</h3>
<button type="button">Load</button>
</div>
</div>
<div class="button" id="letter-f">F
<form>
<input type="text" name="term" value="" id="term" />
<input type="submit" name="search" value="search" id="search" />
</form>
</div>
<div id="loading">
Loading...
</div>
</form>
html:
<h3>Some text</h3>css:
h3 {font-size: 14px;}jquery: