Bharat Ruparel wrote:
> The problem is solved. I changed the "change" event to "clicked" event
> as shown below:
>
> jQuery(function(){
> jQuery('#has_expiration_date input').change(function(){
> jQuery('#discount_order__codes_expire_at').attr('disabled',
> !jQuery('#discount_order__codes_expire_at').attr('disabled'))
> });
> jQuery('#ctype').clicked(function(){ <------ changed from "change"
> event
> jQuery('#discount_order__requested_codes').attr('disabled',
> !jQuery('#discount_order__requested_codes').attr('disabled'));
> if (jQuery('#discount_order__code_type_affiliate:checked').val() ==
> 'affiliate') {
> jQuery('#discount_order__requested_codes').val("")
> }
> })
> })
> </script>
>
> I got this tip from the jQuery in Action book written by Bear Bibeault
> and Yehuda Katz. They document it on page 114. Thank you gentlemen.
>
> One thing that I am learning as a new Javascript/jQuery developer is
> that not everything works in a cross-platform manner even in a
> supposedly cross-browser library as jQuery.
>
> Bharat
mostly try to avoid Jquery.
if you Jquery some functions prototype won't work.
I have faced this problem earlier.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" 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/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---