Can I find a button by it's html in jQuery?

I need to find the 'Today' button in jQuery UI Datepicker and remove it.

This is it's html:

<button onclick="DP_jQuery_1295079747879.datepicker._gotoToday('#newMessageExpirationDate');" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" type="button">Today</button>

I tried this

buttonPanel.find('button[innerHtml="Today"]') buttonPanel.find('button[html="Today"]') buttonPanel.find('button[value="Today"]')

but it doesn't work.

-------------Problems Reply------------

You need to use :contains():


You need to use the :contains selector.


You can't do that, the [] syntax is for attribute matching. Why can't you match by id or class instead?

Category:jquery Views:0 Time:2011-01-15

Related post

Copyright (C), All Rights Reserved.

processed in 0.103 (s). 11 q(s)