Skip to content

With include_javascripts, is there a way to get just the URL? #206

Open
bhellman1 opened this Issue Sep 19, 2011 · 1 comment

2 participants

@bhellman1

I need to use $.getScript, To use getScript I would need just the URL from Jammit. Is this possible?

$.getScript('ajax/test.js', function(data, textStatus){
console.log('Load was performed.');
});

Thanks

@danielstocks

Here's what i did:

     <%= javascript_path (Jammit.asset_url("desktop", :js)) %>

Assumes you have :desktop JavaScript packages in config/assets.yml

cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.