frontend.js.php 779 B

12345678910111213141516171819202122232425262728
  1. jQuery(function($) {
  2. <?php if ( 'lightbox' == $settings->link_type ) : ?>
  3. if (typeof $.fn.magnificPopup !== 'undefined') {
  4. $('.fl-node-<?php echo $id; ?> a').magnificPopup({
  5. type: 'image',
  6. closeOnContentClick: true,
  7. closeBtnInside: false,
  8. tLoading: '',
  9. preloader: true,
  10. callbacks: {
  11. open: function() {
  12. $('.mfp-preloader').html('<i class="fas fa-spinner fa-spin fa-3x fa-fw"></i>');
  13. }
  14. }
  15. });
  16. }
  17. <?php endif; ?>
  18. $(function() {
  19. $( '.fl-node-<?php echo $id; ?> .fl-photo-img' )
  20. .on( 'mouseenter', function( e ) {
  21. $( this ).data( 'title', $( this ).attr( 'title' ) ).removeAttr( 'title' );
  22. } )
  23. .on( 'mouseleave', function( e ){
  24. $( this ).attr( 'title', $( this ).data( 'title' ) ).data( 'title', null );
  25. } );
  26. });
  27. });