rcrowe / Turbo

Think Ruby turbolinks but for your PHP application. Powered by pjax.
87 stars 6 forks source link

how to use it? #3

Open thearabbit opened 10 years ago

thearabbit commented 10 years ago

I am new with Turbo. How to use it? Please example for me. Thanks.

ghost commented 10 years ago

The documentation does give an example at https://github.com/rcrowe/Turbo#pjax. You install the module and the javascript component. In the example "$(document).pjax('.js-pjax', 'body');", it's saying any link with css class "js-pjax" will be a turbolink request which will replace the contents of .

bhoopal10 commented 9 years ago

i am getting type error pjax is not a function

iamzozo commented 9 years ago

Did you install the Pjax js plugin also? Turbo only handles the backend to serve partials for the pjax plugin.

bhoopal10 commented 9 years ago

how to install Pjax with composer

iamzozo commented 9 years ago

Pjax itself is a front-end jquery plugin, I think you can't install it with composer. You have to include as any other javascript file, like jquery or if you are using bower.

bhoopal10 commented 9 years ago

okay :)

bhoopal10 commented 9 years ago

in front end Pjax is working perfectly but in server side it is not working. Means in controller if i print any string it is working but if i make view then it is loading full page