Reload Content Selector - How to use Extend Pjax #32

Closed
opened 2014-10-18 03:29:25 -05:00 by chipgata · 3 comments
chipgata commented 2014-10-18 03:29:25 -05:00 (Migrated from github.com)

I want reload content pjax selector.

Please give me example about Extend Pjax or anyway solution to solve this problem

I want reload content pjax selector. Please give me example about Extend Pjax or anyway solution to solve this problem
MoOx commented 2014-10-19 00:06:55 -05:00 (Migrated from github.com)

Can you try something like this ?

var p = new Pjax()
p.loadUrl(url, Pjax.clone(p.options))
Can you try something like this ? ``` js var p = new Pjax() p.loadUrl(url, Pjax.clone(p.options)) ```
chipgata commented 2014-10-19 04:47:46 -05:00 (Migrated from github.com)

Thank MoOx!
But I have problem with page scroll bar.

Here my code:

var pjaxOptions = {
    elements: "a",
    selectors: [".p-content"],
    switches: {
        ".p-content": Pjax.switches.outerHTML, 
    },
    debug:false,
}

var p = new Pjax(pjaxOptions)


Here my process code return result:

if (data.status == "success") {
                    notyfy({text: data.msg, type: "success", layout: "top"});
                    $("#modal-project").modal("hide");
                    p.loadUrl("/projects", Pjax.clone(p.options)) 
                }

Result:
-Page reload ---> OK
-Scroll bar not working

Thank MoOx! But I have problem with page scroll bar. Here my code: ``` javascript var pjaxOptions = { elements: "a", selectors: [".p-content"], switches: { ".p-content": Pjax.switches.outerHTML, }, debug:false, } var p = new Pjax(pjaxOptions) ``` Here my process code return result: ``` javascript if (data.status == "success") { notyfy({text: data.msg, type: "success", layout: "top"}); $("#modal-project").modal("hide"); p.loadUrl("/projects", Pjax.clone(p.options)) } ``` Result: -Page reload ---> OK -Scroll bar not working
MoOx commented 2014-10-19 22:21:47 -05:00 (Migrated from github.com)

What do you mean by scroll bar not working ? Please provide more informations.

What do you mean by scroll bar not working ? Please provide more informations.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: iLoveElysia/pjax#32