Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var cards = $('.cards'); // only fetches previous cards, not the new ones
- my_function( cards );
- def fetch_cards
- respond_to do |format|
- format.js
- end
- end
- $.ajax('your/resources.json',
- complete: function(jqXHR, status){
- // this will be executed once the server has completed your request
- my_function(cards);
- }
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement