This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('img.swap').click(function() { | |
var src = ($(this).attr('src')); | |
var swap = ($(this).data('swap')); | |
$(this).attr('src', swap ); | |
$(this).data('swap', src ); | |
}); | |
// <img src="images/pic1.jpg" data-swap="images/pic2.jpg" class="swap"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a[href="gallery/gallery$.jpg" rel="gallery"]*10>img[src="gallery/gallery$.jpg" alt="Gallery Image"] | |
Sample Ouput: | |
<a href="gallery/gallery1.jpg" rel="shadowbox"><img src="gallery/gallery1.jpg" alt="Gallery Image"></a> | |
<a href="gallery/gallery2.jpg" rel="shadowbox"><img src="gallery/gallery2.jpg" alt="Gallery Image"></a> | |
<a href="gallery/gallery3.jpg" rel="shadowbox"><img src="gallery/gallery3.jpg" alt="Gallery Image"></a> | |
<a href="gallery/gallery4.jpg" rel="shadowbox"><img src="gallery/gallery4.jpg" alt="Gallery Image"></a> | |
<a href="gallery/gallery5.jpg" rel="shadowbox"><img src="gallery/gallery5.jpg" alt="Gallery Image"></a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php $my_query = new WP_Query( 'posts_per_page=3' ); | |
while ( $my_query->have_posts() ) : $my_query->the_post(); | |
$do_not_duplicate = $post->ID; ?> | |
<div class="entry"> | |
<h3><?php the_title(); ?></h3> | |
<?php the_excerpt(); ?> | |
<a class="readmore" href="<?php the_permalink(); ?>">Read more »</a> | |
</div> | |
<?php endwhile; ?> |