OK, it looks like that JRails is better for dealing with Rails2, but
not for Rails3!
So there is only one question left: If a install the "jquery-rails"
gem like you mentioned, are the
prototype helpers still working?
Right now I am using your code in html tags and it is working like a
charm, lik
Thank you for your detailed answer!
I started with Rails 3, so there is no "old" Rails 2 code in it. As I
know Rails 3 comes out-of-the-box configured with prototype, right? So
yes I have prototype installed.
And yes you are right I meant javascript helpers (not JAVA), like
this:
<%= button_to 'D
>
>
> google to your Gemfile and at this
>
>
should be 'move to your gem file', it appear i was making honor to my motto:
cogito ergo google
--
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 rubyonrails
On Tue, Oct 25, 2011 at 4:14 AM, Sebastian
wrote:
> Ah, I found my mistake!!!
>
> I was just only adding JQuery in my view with <%=
> javascript_include_tag "http://code.jquery.com/jquery-latest.js"; %>,
> but not in my application.html.erb. That means that the code in the
> application.js had pro
Ah, I found my mistake!!!
I was just only adding JQuery in my view with <%=
javascript_include_tag "http://code.jquery.com/jquery-latest.js"; %>,
but not in my application.html.erb. That means that the code in the
application.js had propably no JQuery access!
My problem now is that my other norma
Well, could you paste your HTML code here?
On Tue, Oct 25, 2011 at 1:58 PM, Sebastian
wrote:
> First, thank you all for your answers!!!
>
> I removed the typo and did what you told me! The firebug console is
> finding the $(".show1") and it is hiding the row if I type $
> (".show1") .hide()
>
> S
First, thank you all for your answers!!!
I removed the typo and did what you told me! The firebug console is
finding the $(".show1") and it is hiding the row if I type $
(".show1") .hide()
So I tried your example with the log output, but Firebug says me "$
(document).ready is not a function"
My
On Mon, Oct 24, 2011 at 10:56 AM, Walter Lee Davis wrote:
>
> On Oct 24, 2011, at 10:50 AM, Roy Situmorang wrote:
>
> > I'm sorry for the typo, I have just fixed the code as follow:
> >
> > (function() {
> > $("#filters input:checkbox").click(
> > function(){
> >class_to_show = $(this).attr(
On Oct 24, 2011, at 10:50 AM, Roy Situmorang wrote:
> I'm sorry for the typo, I have just fixed the code as follow:
>
> (function() {
> $("#filters input:checkbox").click(
> function(){
>class_to_show = $(this).attr("id");
> switch(class_to_show){
> case 'show1':
> $(".show1"
I'm sorry for the typo, I have just fixed the code as follow:
(function() {
$("#filters input:checkbox").click(
function(){
class_to_show = $(this).attr("id");
switch(class_to_show){
case 'show1':
$(".show1").show();
$(".show2").hide();
break;
case 'show2':
I'm sorry, I have just fixed the code as follow:
(function() {
$("#filters input:checkbox").click(
function(){
class_to_show = $(this).attr("id");
switch(class_to_show){
case 'show1':
$(".show1").show();
$(".show2").hide();
break;
case 'show2':
$(".show
On Oct 24, 2011, at 10:25 AM, Sebastian wrote:
> EDIT: The error is in the line after the "default"
>
> On 24 Okt., 16:23, Sebastian wrote:
>> With the modified code, Firebug gives me that error:
>> missing : after case label
>> $(".show1").show();
>>
>> Code in application.js looks like this
EDIT: The error is in the line after the "default"
On 24 Okt., 16:23, Sebastian wrote:
> With the modified code, Firebug gives me that error:
> missing : after case label
> $(".show1").show();
>
> Code in application.js looks like this now:
>
> (function() {
> $("#filters input:checkbox").click(
With the modified code, Firebug gives me that error:
missing : after case label
$(".show1").show();
Code in application.js looks like this now:
(function() {
$("#filters input:checkbox").click(
function(){
class_to_show = $(this).attr("id");
switch(class_to_show){
case 'show1':
On Oct 24, 2011, at 8:53 AM, Sebastian wrote:
> Yes you are right! Yours is looking better!
>
> But I am not getting it to work!
>
> I have now the followinfg in my public/javascripts/application.js:
>
> $("#filters input:checkbox").click(function(){
> class_to_show = $(this).attr("id");
>
Try this modified code:
(function() {
$("#filters input:checkbox").click(
>
> function(){
>class_to_show = $(this).attr("id");
> switch(class_to_show){
> case 'show1':
> $(".show1").show();
> $(".show2").hide();
> break;
> case 'show2':
> $(".show1").hid
Yes you are right! Yours is looking better!
But I am not getting it to work!
I have now the followinfg in my public/javascripts/application.js:
$("#filters input:checkbox").click(function(){
class_to_show = $(this).attr("id");
switch(class_to_show){
case 'show1':
$(".show1")
I tried the following without success:
<%= check_box_tag 'Filter A', @filter1, :onClick => "$
(this).is(':checked') && $(this.value).addClass('hidden') || $
(this.value).removeClass('hidden');" %>
On 21 Okt., 18:31, Tim Shaffer wrote:
> Have a look at the documentation for check_box_tag
>
> http
Have a look at the documentation for check_box_tag
http://api.rubyonrails.org/classes/ActionView/Helpers/FormTagHelper.html#method-i-check_box_tag
It specifies that any other keys passed to options will be used as HTML
attributes. So you can pass your onclick attribute to check_box_tag in the
o
19 matches
Mail list logo