js += "$j('##{html_id}').select2('open');"
end
- "#{html}<script>#{js}</script>"
+ "#{html}<script>$j(document).ready(function(){#{js}});</script>"
end
:disabled => options[:disabled],
:id => html_id)
js = "$j('##{html_id}').select2({#{js_options.map { |k, v| "#{k}:#{v}" }.join(',')}});"
- "#{html}<script>#{js}</script>"
+ "#{html}<script>$j(document).ready(function() {#{js}});</script>"
end
#
if options[:open]
js += "$j('##{html_id}').select2('open');"
end
- "#{html}<script>#{js}</script>"
+ "#{html}<script>$j(document).ready(function() {#{js}});</script>"
end
#