Attaching a jquery function to some textboxes
- by diver-d
I am a newbie to jquery and need a little help. I have created the below function which does what I want it to however when I select a textbox every other textbox are automatically selected. How do I change it and pass a parameter from the textbox so only the selected textboxes css changes on focus and blur?
<script language="javascript" type="text/javascript">
$(function () {
$('.myTextBox').focus(function () {
$('.box.textbox').addClass("active");
}).blur(function () {
$('.box.textbox').removeClass("active");
});
});
</script>