jstayton/jquery-manifest — Issue #7: Exposing onFocus/onBlur events
Author: callmevlad
Created: 2011-12-13 00:45:49+00:00
State: open

Hey Justin,

I'm using Twitter's Bootstrap CSS, which has a very nice focus/blur effect for native input elements (see http://twitter.github.com/bootstrap/#forms), and I was trying to see how feasible it would be to add a similar effect to Manifest, since it does sort of emulate a native textbox.

In a nutshell, I want the `mf_container` element to have a specific class (e.g. 'mf_focused') when the input element (`mf_input`) is in focus in order to emulate a native input's `:focus` pseudo-class. In CSS, I can then select and style `div.mf_container.mf_focused` as if it was `input.mf_input:focus`, and by doing so re-create the Twitter Bootstrap style. One way I can think of implementing this in Manifest is to add new event callbacks like `onFocus` and `onBlur`, which can then be used to manipulate the container class.

Given how fast you got back to me last time (thanks again!), I thought I'd throw this feature request your way as well, and then implement it myself in a fork if you decide something like this should not be part of the core library.

Thanks!
Vlad