Can I use a View in my JS code, by adding the View's shortcode where the JS expects some results?
The View returns the results the code expects.
Generally, ShortCodes can not be added to JS.
You could add the JS within script tags to your HTML section of a content Template for example.
Then you could apply this custom code here to retrieve a "raw" Views' loop result.
This can then eventually be used to populate your Custom JS.
This is however not suggetsed, n or supported.
It is a full custom solution - and not agreeing with Toolset Views' major purpose, which is to display - not deliver data.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
|-||-||14:00 – 20:00||14:00 – 20:00||14:00 – 20:00||14:00 – 20:00||14:00 – 20:00|
Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)