Function is working, although
it is very unorthodox way to get to where
you are going. Look in Firebug, class highlight is being added and
removed. div's are just collapsed
Add *float: left* to css for class form_row, highlight works fine in
Firebug
As for function. Could simplify the whole thing a lot by better
selector choice. You have a class for all the inputs you need to focus
on, using that for your selector makes it all a lot more readable, and
should there be a lot of inputs on page, more search efficient.
Chaining is great but in your case seems to go to an extreme in order
to make a very round about route
try this and see how it works out, it's certainly a lot easier to read,
therefore troubleshoot
$(".inputTxt").focus(function() {// instead of starting at parent div,
go straight to the input class already assigned , using $('div") on
most pages will cause more searching than necessary
$('highlight').removeClass('highlight');// this one very simple, if
no class "highlight" exists, will be ignored, will work after first
focus when next input focused on however
$(this).parents(".form_row").addClass('highlight'); //reduces
need for parents then filter, just target the parent you want in
brackets
});
intrader wrote:
Just a disgusted-at-Microsft answer.
Most likely I would suspect Microsoft (even when it 'works'). Break
the _expression_ into two - this is not jQuery like, but it may help.
Good luck
On Jul 9, 1:12 pm, bgibilaro <[email protected]> wrote:
All,
I have created a very simply jQuery script which implements a new CSS class
that changes the background color of the containing DIV of a text field when
focused on. It works great in IE, however, for some reason it does nothing
in Firefox. I am not getting an error of any sort. It just does not work.
To see an example, go tohttp://www.kcsysadmin.com/nominate.phpand focus on
one of the form fields and tab through. If you do this from both IE and
Firefox you should see the difference.
Here is my code:
http://www.nabble.com/file/p24393078/jquery_script.jpg
Any thoughts? Thanks for your help.
Bob Gibilaro
--
View this message in context:http://www.nabble.com/jQuery-Script-Not-Working-In-Firefox-tp24393078...
Sent from the jQuery UI Discussion mailing list archive at Nabble.com.