[jQuery] Re: How do I select an Element with the ID=foo.bar:data with jQuera Selectors?

2007-09-28 Thread ravenel

Thanks - that helped me a lot...

Did not see it in the FAQs before!

On 27 Sep., 23:52, Karl Rudd [EMAIL PROTECTED] wrote:
 To select an element with an id=#foo.bar:filter in CSS you would use:

 #foo\.bar\:filter { /* ... */ }

 jQuery uses the same syntax (though make sure you're using a newer,
 1.2+ version).

 When using a literal string (that is string) you will have to
 escape the \s because of the way JavaScript works, so the end result
 would be:

 jQuery('#foo\\.bar\\:filter')

 Karl Rudd

 On 9/28/07, ravenel [EMAIL PROTECTED] wrote:



  Hello jQuery Coders!

  Since it is allowed to use ., :  in the id-Tag (http://www.w3.org/
  TR/html4/types.html#h-6.2)

  I wonder how I select it while using  the jQuery Selector Syntax?

  jQuery('#foo.bar:filter') doesn't work since it means element with id
  foo and class bar and filter data?

  is this a bug a feature or a problem?



[jQuery] Re: How do I select an Element with the ID=foo.bar:data with jQuera Selectors?

2007-09-27 Thread Karl Swedberg


On Sep 27, 2007, at 11:05 AM, ravenel wrote:


Hello jQuery Coders!

Since it is allowed to use ., :  in the id-Tag (http://www.w3.org/
TR/html4/types.html#h-6.2)

I wonder how I select it while using  the jQuery Selector Syntax?

jQuery('#foo.bar:filter') doesn't work since it means element with id
foo and class bar and filter data?


is this a bug a feature or a problem?



I think this is what you're looking for:

http://docs.jquery.com/ 
Frequently_Asked_Questions#How_do_I_select_an_element_that_has_weird_cha 
racters_in_its_ID.3F


--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com




[jQuery] Re: How do I select an Element with the ID=foo.bar:data with jQuera Selectors?

2007-09-27 Thread Brandon Aaron
This FAQ should help you.
http://docs.jquery.com/Frequently_Asked_Questions#How_do_I_select_an_element_that_has_weird_characters_in_its_ID.3F

--
Brandon Aaron

On 9/27/07, ravenel [EMAIL PROTECTED] wrote:


 Hello jQuery Coders!

 Since it is allowed to use ., :  in the id-Tag (http://www.w3.org/
 TR/html4/types.html#h-6.2)

 I wonder how I select it while using  the jQuery Selector Syntax?

 jQuery('#foo.bar:filter') doesn't work since it means element with id
 foo and class bar and filter data?


 is this a bug a feature or a problem?




[jQuery] Re: How do I select an Element with the ID=foo.bar:data with jQuera Selectors?

2007-09-27 Thread Karl Rudd

To select an element with an id=#foo.bar:filter in CSS you would use:

#foo\.bar\:filter { /* ... */ }

jQuery uses the same syntax (though make sure you're using a newer,
1.2+ version).

When using a literal string (that is string) you will have to
escape the \s because of the way JavaScript works, so the end result
would be:

jQuery('#foo\\.bar\\:filter')

Karl Rudd

On 9/28/07, ravenel [EMAIL PROTECTED] wrote:

 Hello jQuery Coders!

 Since it is allowed to use ., :  in the id-Tag (http://www.w3.org/
 TR/html4/types.html#h-6.2)

 I wonder how I select it while using  the jQuery Selector Syntax?

 jQuery('#foo.bar:filter') doesn't work since it means element with id
 foo and class bar and filter data?


 is this a bug a feature or a problem?




[jQuery] Re: How do I select an Element with the ID=foo.bar:data with jQuera Selectors?

2007-09-27 Thread Christian Bach
try: jQuery('#foo\\.bar\\:filter');

2007/9/27, ravenel [EMAIL PROTECTED]:


 Hello jQuery Coders!

 Since it is allowed to use ., :  in the id-Tag (http://www.w3.org/
 TR/html4/types.html#h-6.2)

 I wonder how I select it while using  the jQuery Selector Syntax?

 jQuery('#foo.bar:filter') doesn't work since it means element with id
 foo and class bar and filter data?


 is this a bug a feature or a problem?