document.on("click", "a[data-popup]", function(event, element) {if (event.stopped) return;window.open($(element).href);event.stop();});
Just add to your link:
:target => '_blank'
In your exemple, made this:
link_to "foo", foo_path(foo), :target => '_blank'
Best regards
Peter De Berdt
otherwise it didnt work.
Good luck Dave
$('a[data-popup]').live('click', function(e) {
window.open($(this)[0].href);
e.preventDefault();
});
> --
> 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 rubyonra...@googlegroups.com.
> To unsubscribe from this group, send email to
> rubyonrails-ta...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>
>
--
View this message in context: http://old.nabble.com/Rails3%3A-open-link-in-new-window-tp29179554p30147197.html
Sent from the RubyOnRails Users mailing list archive at Nabble.com.