Ad
How To Catch Pagination Element Of Shopify Api With Jquery
How to enable any of the pagination
button by clicking on my ajax
request.
Scenario: In my shopify app, I have a checkbox on which I am sending a ajax
request and in response I want to enable this button.
Tried: I have tried some solutions mentioned in stackoverflow but couldn't work.
Here: window.parent.document
this raise error for permission denied
.
Ad
Answer
You can call the same code of shopify pagination in the ajax response. So it will take your changed pagination value and enable the pagination buttons.
ShopifyApp.ready(function(){
ShopifyApp.Bar.initialize({
title: window.mainPageTitle,
icon: '/icon20x20.png',
pagination: {
previous: {href: "/start?page=1"},
next: {href: "/start?page=3"}
}
});
});
Ad
source: stackoverflow.com
Related Questions
- → Trigger a click with jQuery using link_to of rails 4
- → Adding html data attribute to simple_forms input
- → How to remove parameters from the root URL if it does I18n
- → passing parameters to rails back end from an ajax call
- → Blocking ?page= in robots.txt
- → react js and rails Updating state on a component with active record relationship
- → Kaminari How to process routes as javascript
- → State not passed into prop
- → Cannot read property 'modalIsOpen' of undefined
- → Objects not valid issue
- → How to map API params to model
- → Consuming webhooks shopify-api
- → How to add ScriptTag on shopify_api gem?
Ad