rubyonrailsin

A Ruby and Rails talk

Friday, March 26, 2010


Re: [Rails] Re: Re: Re: Prototype Helpers & jQuery

by rubyonrailsin 0 comments

Tag


Share this post:
Design Float
StumbleUpon
Reddit

PS. Don't know if the loading of tooltip should be moved down below jQuery or Prototype – it depends on what it relies on.

/Lasse

2010/3/26 Lasse Bunk <lassebunk@gmail.com>
Ok, what I didn't think of was that the jQuery noConflict call should of course occur *before* loading Prototype, like this:


<head>
 <%= javascript_include_tag "tooltip" %>
 <%= javascript_include_tag 'jquery' %>
 <script type="text/javascript" charset="utf-8">
   jQuery.noConflict();
 </script>

 <%= javascript_include_tag "jquery.prettyPhoto" %>
 <%= javascript_include_tag 'application' %>
 <%= javascript_include_tag 'prototype' %>
 <%= javascript_include_tag 'scriptaculous' %>
</head>

<body>
<script type="text/javascript" charset="utf-8">
  jQuery(document).ready(
    function() {
      jQuery("a[rel^='prettyPhoto']").prettyPhoto();
    });
</script>

Would this do the trick?


/Lasse

2010/3/26 Chris Kalaboukis <lists@ruby-forum.com>
Lasse Bunk wrote:
> Ok – just as a test, does it work if you delete these lines?
>
>   jQuery.noConflict();
>   jQuery(document).ready(
> function() {
>     jQuery("a[rel^='prettyPhoto']").prettyPhoto();
>   });
>
> /Lasse
>
>
> 2010/3/26 Chris Kalaboukis <lists@ruby-forum.com>

Yes, prototype does work, once I remove those lines...but of course
jquery doesn't.

--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.



--
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-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment

Subscribe feeds via e-mail

Blog Archive