1
0
Fork 0
mirror of https://github.com/kbparagua/paloma synced 2023-03-27 23:21:17 -04:00

Update README.md

This commit is contained in:
Karl Bryan Paragua 2015-05-01 13:06:56 +08:00
parent b712bd3d2a
commit 06e2567433

View file

@ -277,6 +277,22 @@ Inside this HTML hook is where the magic happens. This is the reason why Paloma
Ideally, you just need to call `insert_paloma_hook` in your layouts, since the layout will always be included in every rendered view. But if you are rendering a view without a layout, make sure to call `insert_paloma_hook` in that view.
## AJAX
1. Make sure that the AJAX response contains the html hook. (use `insert_paloma_hook`)
2. Execute the hook and start Paloma's engine on complete/success.
```js
$.get('http://example.com', function(response){
$('#result').html(response);
// Execute Paloma hook and start the engine.
Paloma.executeHook();
Palama.engine.start();
});
```
## Turbolinks Support
As of version `4.1.0`, Paloma is compatible with Turbolinks without additional setup.