Guest User

Untitled

a guest
Mar 23rd, 2017
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. jQuery().ready(function() {
  2.  
  3. //handles the modal images
  4. tdModalImage();
  5.  
  6. //move classes from post images to figure - td-post-image-full etc
  7. tdUtil.imageMoveClassToFigure( 'td-post-image-full' );
  8. tdUtil.imageMoveClassToFigure( 'td-post-image-right' );
  9. tdUtil.imageMoveClassToFigure( 'td-post-image-left' );
  10.  
  11. /**
  12. * - add a general td-modal-image class to the all post images
  13. */
  14. if ( ( 'undefined' !== typeof window.tds_general_modal_image ) && ( '' !== window.tds_general_modal_image ) ) {
  15. jQuery( '.single .td-post-content a > img' ).filter(function( index, element ) {
  16. if ( -1 !== element.className.indexOf( 'wp-image' ) ) {
  17. jQuery( element ).parent().addClass( 'td-modal-image' );
  18. }
  19. });
  20. }
  21. });
Advertisement
Add Comment
Please, Sign In to add comment