I'm just glad it only took 2 hours, and not 2 weeks. I always tend to think outside the box. Unfortunately, I often find myself inside another box just beside the original box. Are there any sorts of explicit documentation that warns against "gotchas" of this nature? Thanks for the hand-holding all. You guys rock!
On Feb 8, 12:28 am, brian <bally.z...@gmail.com> wrote: > I believe that all browsers maintain the *original* source that they > receive. This used to bug the heck out of me until a) the FF > WebDeveloper extension came along with "view rendered source" and, b) > I realised that it's in everyone's best interest that the browser > inform you of the exact nature of the source that was received from > the server. Now, of course, there's also firebug with which to see the > changes. > > Whether browsers should include a "view rendered source" option by > default is another matter. (hmmm ... maybe I should go dig around in > about:config) > > On Sat, Feb 7, 2009 at 11:48 PM, gberz3 <gbe...@gmail.com> wrote: > > > Alrighty. First and foremost color me embarrassed, but I wasn't aware > > that the actual source wasn't manipulated. For instance, if I click > > on the browsers' VIEW SOURCE, it maintains the original. However, if > > I view the OBJECT via the CONSOLE of either Firebug, or view the HTML > > via the CONSOLE in Safari then I see the changes. > > > Is this something I should have picked up in Javascript 101? Do > > browsers always maintain the original source? And more important, > > where would I have found this bit of information? What, exactly, is > > the most efficient workflow for testing items of this nature? > > > On Feb 7, 11:32 pm, brian <bally.z...@gmail.com> wrote: > >> Do you see the class added in firebug's HTML view? > > >> On Sat, Feb 7, 2009 at 10:49 PM, gberz3 <gbe...@gmail.com> wrote: > > >> > Ok, this is odd. I can perform a .fadeOut() on the acquired divs, but > >> > the .addClass() method specifically isn't working. Is there anything > >> > in particular that I can check? Specific syntax? Anything? > > >> > Also, thanks for the quick support. > > >> > On Feb 7, 10:33 pm, "Mauricio \(Maujor\) Samy Silva" > >> > <css.mau...@gmail.com> wrote: > >> >> There is nothing wrong with your jQuery code. > >> >> Double check the link to jQuery library and the HTML markup. > > >> >> Try this example tested here: > > >> >> <style type="text/css" media="all"> > >> >> .midget {background:red} > >> >> </style> > > >> >> <script > >> >> src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js"></script> > > >> >> <script type="text/javascript"> > >> >> $(document).ready(function(){ > >> >> $(".testclass").each(function(){ > >> >> $(this).addClass("midget");}); > > >> >> }); > >> >> </script> > >> >> ... > >> >> <body> > >> >> <p class="testclass">Some text</p> > >> >> <b class="testclass">Some bold text</b> > >> >> ... > > >> >> -----Mensagem Original----- > >> >> De: "gberz3" <gbe...@gmail.com> > >> >> Para: "jQuery (English)" <jquery-en@googlegroups.com> > >> >> Enviada em: domingo, 8 de fevereiro de 2009 01:07 > >> >> Assunto: [jQuery] Using selectors successfully...? > > >> >> > Will someone please explain to me why the following code fails to > >> >> > execute? I have a simple test page set up and jquery doesn't seem > >> >> > happy with what I'm trying to do. I get no errors, and when I log to > >> >> > console in firebug it shows that it is indeed finding my two objects, > >> >> > however it won't actually perform 'addClass': > > >> >> > $(document).ready(function() { > > >> >> > $(".testclass").each(function(){ > >> >> > $(this).addClass("midget"); > >> >> > }); > >> >> > }); > > >> >> > At first I just figured it was because I wasn't doing an "each", but > >> >> > then after trying each and having it still fail, I was back to square > >> >> > one. Also, is it not possible to select based on tags (e.g. > >> >> > 'div.divclass')? > > >> >> > Any help would be much appreciated. > > >> >> > Best!