You can still use the same technique but just not use jQuery to do it.
On Aug 10, 10:09 am, MartinBorthiry wrote:
> On 10 ago, 16:49, "Dan G. Switzer, II"
> wrote:
>
> > You can add a class to your field when it has focus and then check for the
> > class:
> > $(":input")
> > // add focus/blur e
On 10 ago, 16:49, "Dan G. Switzer, II"
wrote:
> You can add a class to your field when it has focus and then check for the
> class:
> $(":input")
> // add focus/blur events
> .focus(function (){
> $(this).addClass("has-focus");})
>
> .blur(function (){
> $(this).removeClass("has-focus");
>
> })
You can add a class to your field when it has focus and then check for the
class:
$(":input")
// add focus/blur events
.focus(function (){
$(this).addClass("has-focus");
})
.blur(function (){
$(this).removeClass("has-focus");
});
Now you can just do $("input#1").is(".has-focus") to check if it has
3 matches
Mail list logo