This is a migrated thread and some comments may be shown as answers.

When focus is brought to check box through tab, it is not getting highlighted.

1 Answer 558 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Vargis
Top achievements
Rank 1
Vargis asked on 22 Sep 2012, 09:43 AM
What to do to checkbox focus highlight when tab key played through my application

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 24 Sep 2012, 06:23 AM
Hi Vargis,

Try the following jquery to highlight checkbox on focus. 

JS:
<script type="text/javascript">
    $(".rbToggleButton").focus(function ()
    {
        $(".rbToggleCheckbox").addClass("highlight");
    });
    $(".rbToggleButton").focusout(function ()
    {
        $(".rbToggleCheckbox").removeClass("highlight");
    });
</script>

CSS:
<style type="text/css">
 .highlight
{
 background-position: -4px -20px !important;
}
</style>

Thanks,
Princy.
Tags
General Discussions
Asked by
Vargis
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or