Open tnog opened 11 years ago
THANKS!!!!! (Not jammin with Reverie now but when I do in a week or so I'll give this a try.)
Very good snippets, thanks @tnog
Can you please guide me where to add the PHP code you mentioned above? In functions.php or page template?
I created a plugin and wrapped everything in a class, but you could probably modify the functions above and add them into your function.php file. You'll have to enqueue the .js file and add the template markup accordingly.
Yes I also wrapped in class. Activated plugin with no errors, load all js and admin-ajax.php
But when I click on link nothing happens and the console shows me error "Uncaught ReferenceError: Foundation is not defined" on line 4 "Foundation.libs.reveal = {" and "Uncaught TypeError: Object [object Object] has no method 'foundation' sketchbook_ajax.js:3"
Is it possible to get your working version of plugin?
I just uploaded my plugin file into a new repository: https://github.com/tnog/sketchbook-plugin
Try downloading and playing around with it.
VERY cool of you to offer this! I haven't tried it yet.. by chance is there a demo of it working in Reverie somewhere? Thx R
tnog, Thank you so much :) I will checkt it
tnog, Thank you for this code. I have this working really nicely in my WP responsive theme. Just had to tweak it a little, .reveal instead of .foundation and a few adjustments here and there. Great stuff.
This isn't a issue, but perhaps helpful to others. I created a plugin that integrates WordPress' native AJAX with Reveal so you can populate modal windows with WP content. Not only that, but you can use secondary links within open modal windows to page through previous/next post content. And also, the modal windows are centered in the page, even if they are resized to content of variable width. The jQuery code is below:
sketchbook_ajax.js
And here's the PHP code:
Oh and also the corresponding template code. The important variable is the
data-id
populated with the post ID. Since sketchbook_ajax.js needs the post ID to assign a unique id to the reveal-modal windows.