form submit reload #188

Closed
opened 2018-12-05 12:57:21 -05:00 by nicdnepr · 2 comments
nicdnepr commented 2018-12-05 12:57:21 -05:00 (Migrated from github.com)
new Pjax({
        elements: 'a[ajaxLink], li.page a, div.sorter a, form',
        selectors: ['#page']
    });

Why $('#form-id').submit(); not work? It reloads page
If click submit button- then works

``` new Pjax({ elements: 'a[ajaxLink], li.page a, div.sorter a, form', selectors: ['#page'] }); ``` Why `$('#form-id').submit();` not work? It reloads page If click submit button- then works
BehindTheMath commented 2018-12-05 12:59:44 -05:00 (Migrated from github.com)

I don't know how jquery's submit method works. If you're using jquery anyway, why don't you use jquery-pjax?

I don't know how jquery's submit method works. If you're using jquery anyway, why don't you use [jquery-pjax](https://github.com/defunkt/jquery-pjax)?
nicdnepr commented 2018-12-05 13:02:14 -05:00 (Migrated from github.com)

jquery-pjax gives errors in my case
this library work perfect
I can use hidden submit button, but it looks not beautiful as for me

jquery-pjax gives errors in my case this library work perfect I can use hidden submit button, but it looks not beautiful as for me
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: iLoveElysia/pjax#188