1/* global jQuery */ 2jQuery(document).ready(function( $ ){ 3 "use strict"; 4 /* global MPPFeaturedContent */ 5 var ajax_url = MPPFeaturedContent.ajaxUrl; 6 7 $(document).on('click', 'a.mppftc-featured-btn',function() { 8 var $this = $(this); 9 10 $.post( ajax_url, { 11 action: 'mppftc_featured_action', 12 item_id: $this.data('item-id'), 13 nonce: $this.data('nonce') 14 }, function(resp){ 15 if ( resp.success ) { 16 $this.replaceWith( resp.data.button ); 17 } 18 }); 19 20 return false; 21 }); 22 23 // lightbox for media. 24 $(document).on('click', '.mppftc-featured-media a', function () { 25 var $this = $(this); 26 var $container = $this.parents( '.mppftc-featured-media' ); 27 if( $container.data('mpp-lightbox-enabled') == '0' ) { 28 return ; 29 } 30 31 if( ! mpp.lightbox.isLoaded() ) { 32 return ; 33 } 34 mpp.lightbox.media( $container.data('mpp-media-ids'), 0, $this.attr('href'), $this.data('mpp-media-id') ); 35 return false; 36 }); 37});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.