load just content part of a post into lightbox/modal window
I'm thinking to load into a lightbox/modal window just a specific part of a post.
The post markup is something like this:
<div class="single-template-wrapper">
<header class="single-header">
<div class="single-container">
I have few buttons like : "post1" "post2" and when I click on "post1" for example to display a lightbox with just the <div class="single-container"> inside that specific post. Theme which I'm using has prettyphoto plugin installed, so I'm thinking to use AJAX method to retrive what I want. Something like this:
<a rel="prettyPhoto[ajax]" href="mypost-permalink?ajax=true&width=100%&height=100%">Ajax content</a>
but I don't know how to get just the container part of the post.
Is this the correct approach ? or it's another method of doing this easier? Any suggestion is welcome. Thanks!
I'm thinking to load into a lightbox/modal window just a specific part of a post.
The post markup is something like this:
<div class="single-template-wrapper">
<header class="single-header">
<div class="single-container">
I have few buttons like : "post1" "post2" and when I click on "post1" for example to display a lightbox with just the <div class="single-container"> inside that specific post. Theme which I'm using has prettyphoto plugin installed, so I'm thinking to use AJAX method to retrive what I want. Something like this:
<a rel="prettyPhoto[ajax]" href="mypost-permalink?ajax=true&width=100%&height=100%">Ajax content</a>
but I don't know how to get just the container part of the post.
Is this the correct approach ? or it's another method of doing this easier? Any suggestion is welcome. Thanks!
No comments:
Post a Comment