$("input[name$='DateString']:not([readonly])")
I don't know if jQuery supports [!readonly], if it does then that's an
alternative to :not([readonly]);
readonly is a boolean property, in XML/HTML this means that only it's presence
is required. If it is present the property is true, if it is absent the
property is false.
Thus you use a simple [readonly] to check for the existence of the readonly
attribute. And in your case surround that with a :not() to check for things
without readonly.
~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://daniel.friesen.name]
dmcmeans wrote:
> Using jQuery 1.3.1, the following line works in IE8 and FF.
>
> $("input[name$='DateString']:not([readonly='readonly']),input[name
> $='DateString']:not([readonly='true'])").datepicker
> ( dpOptions ).addClass( "date" ).attr( "maxlength", "12" );
>
> But does not in IE7. I had to alter it to
>
> $("input[name$='DateString']:not([readonly='true'])").datepicker
> ( dpOptions ).addClass( "date" ).attr( "maxlength", "12" );
>
> Because I have to support IE7, my workaround is to break it out
>
> $("input[name$='DateString']").each( function(i) {
> $(this).addClass( "date" ).attr( "maxlength", "12" );
>
> var ls_val = $(this).attr("readonly");
> if ( ls_val == false ) {
> $(this).datepicker( dpOptions );
> }
> });
>
> which works well enough, just not as appealing.
>
> This appears to be a bug in jQuery. Any thoughts?
>
> David
>
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---