2011年1月17日 星期一

How do I select an element by an ID that has characters used in CSS notation

http://docs.jquery.com/Frequently_Asked_Questions#How_do_I_select_an_element

How do I select an element by an ID that has characters used in CSS notation

// Does not work
$("#some:id")

// Works!
$("#some\\:id")

// Does not work
$("#some.id")

// Works!
$("#some\\.id")

沒有留言:

張貼留言