And, to clarify further, the selector for elements with both 'btn' &
'px' classes[1] is '.btn.px'. Note that there's a dot before both
class names. There's also no space--'.btn .px' would select for an
element with classname 'px' inside of another with classname 'btn'.
Remember that jQuery's class
Ricardo and Brian both explained that .is('.btn px') tests for a
element inside an element with class="btn" - not an element with class="btn
px".
You don't have a element, do you? If not, then your code that sets the
background color is never being executed.
Try putting an alert() or a console
Right but you can have to classes defined to one element, and thats
what is being done here. The statement does validate nonetheless, but
rather why this.css doesn't correctly reassign the background is what
i"m unsure of.
On Feb 1, 12:20 pm, brian wrote:
> On Sun, Feb 1, 2009 at 12:09 PM, thert
On Sun, Feb 1, 2009 at 12:09 PM, thertze...@gmail.com
wrote:
>
> what?
>
> That statement checks to see if the element clicked has the class
> of .btn px, I dont know what your saying, the statement there does
> work correctly, its "\$(this).css({ backgroundColor:color }); " that
> isnt modifying
what?
That statement checks to see if the element clicked has the class
of .btn px, I dont know what your saying, the statement there does
work correctly, its "\$(this).css({ backgroundColor:color }); " that
isnt modifying the css, thats where my problems are.
On Feb 1, 9:29 am, Ricardo Tomasi
are you putting that code inside $(document).ready?
if ( \$(e.target).is('.btn px') ) is checking if the clicked element
is a element inside .btn, that condition will never be
satisfied, will it?
On Feb 1, 12:38 pm, "thertze...@gmail.com"
wrote:
> It's being ran from perl, so when perl is pars
It's being ran from perl, so when perl is parsing the print statement,
it thinks $~whatever is a perl variable. Which is strange, because
normally use strict; will bark at you, but instead perl finds a way to
find out what $~whatever is. Its kinda strange, so I have to escape
them server side, but
On Sat, Jan 31, 2009 at 11:19 PM, thertze...@gmail.com
wrote:
>
> \$(this).css({ backgroundColor:color }); never seem to fire, as far as
> I know though, its valid jquery javascript...
>
> As for the statement above "("input#color_code").val() " is whatever
> the user selects from the color picke
Here is the most recent code
http://pastie.org/376427
If I could only get "\$(this).css({ backgroundColor:color });" to
work, I would be happy? Please help me :D Thanks!
On Jan 31, 5:57 pm, "thertze...@gmail.com"
wrote:
> What I'm trying to do is on click of a div spawn a
> "timer" (setTimeout
\$(this).css({ backgroundColor:color }); never seem to fire, as far as
I know though, its valid jquery javascript...
As for the statement above "("input#color_code").val() " is whatever
the user selects from the color picker.
If anyone is questioning my \$ in my javascript, i have to do it this
> Can someone tell me why my \$(this).css({ backgroundColor:color });
> statement isn't changing as soon as the user clicks on a div?
Does it fire at some later time, or never? What is the value of $
("input#color_code").val() ?
Can someone tell me why my \$(this).css({ backgroundColor:color });
statement isn't changing as soon as the user clicks on a div?
On Jan 31, 5:57 pm, "thertze...@gmail.com"
wrote:
> What I'm trying to do is on click of a div spawn a
> "timer" (setTimeout) which will run while the user is on the
I think i finally got it to work, changed all the setTimeout functions
to setInterval, now I just need to figure out why "\$(this).css
({ backgroundColor:color }); " isnt setting the color of the divs
instantly, as well as a new method call for .load (don't need to
reload everytime with client sid
13 matches
Mail list logo