1jQuery(document).ready(function ($) { 2 3 "use strict"; 4 5 $(function MegaMenuNav() { 6 7 var $mega_menu_container = $('.mega-menu-ajax'), 8 $parent_link = $('.menu-item-has-mega-menu > a > span'), 9 $sub_link = $('.menu-item-has-mega-menu .sub-links > .menu-item-type-taxonomy > a > span'); 10 11 $parent_link.add($sub_link).on('mouseover', function () { 12 13 var $this = $(this); 14 15 var selecetd_taxonomy = $this.parent().attr('href'); 16 17 $('.active-link').not($this).removeClass('active-link'); 18 $this.parent().addClass('active-link'); 19 20 $mega_menu_container.parent().addClass('posts-loading'); 21 $mega_menu_container.parent().removeClass('posts-added'); 22 23 $.ajaxSetup({cache: true}); 24 25 $.ajax({ 26 27 cache: true, 28 timeout: 8000, 29 url: ti_async.ti_ajax_url, 30 type: 'POST', 31 data: ({ 32 action: 'filter_posts', 33 taxonomy: selecetd_taxonomy, 34 ti_nonce: ti_async.ti_nonce 35 }), 36 37 success: function (data, textStatus, jqXHR) { 38 39 var $response = $(data); 40 41 $mega_menu_container.html($response); 42 43 $mega_menu_container.parent().removeClass('posts-loading'); 44 $mega_menu_container.parent().addClass('posts-added'); 45 46 } 47 48 }); 49 50 }); 51 52 }); 53 54 55 $(function LatestFormatLoader() { 56 57 $('.media-posts .load-media-content').click(function (e) { 58 59 e.preventDefault(); 60 61 var postid = $(this).attr('data-postid'), 62 metakey = $(this).attr('data-metakey'), 63 container = $('.media-posts #postid-' + postid + ' .media-content'); 64 65 container.parent().addClass('content-loading').removeClass('content-added'); 66 67 $.ajax({ 68 69 cache: false, 70 timeout: 8000, 71 url: ti_async.ti_ajax_url, 72 type: 'POST', 73 data: ({ 74 action: 'load_custom_field_data', 75 ti_nonce: ti_async.ti_nonce, 76 postid: postid, 77 metakey: metakey 78 }), 79 80 success: function (data, textStatus, jqXHR) { 81 82 var $response = $(data); 83 84 container.parent().addClass('content-added'); 85 container.html($response); 86 container.find('iframe').each(function() { 87 var videosrc = $(this).attr('src'); 88 89 if ( videosrc.indexOf('vimeo.com') > -1 || videosrc.indexOf('youtube.com') > -1 ) { 90 $(this).attr('src', videosrc += '?&autoplay=1'); 91 92 } else if ( videosrc.indexOf('soundcloud.com') > -1 ) { 93 $(this).attr('src', videosrc += '?&auto_play=true'); 94 } 95 }); 96 97 } 98 99 }); 100 101 }); 102 103 }); 104 105 106 $(function LatestFormatLoader() { 107 108 $('.entries .load-media-content').click(function (e) { 109 110 e.preventDefault(); 111 112 var postid = $(this).attr('data-postid'), 113 metakey = $(this).attr('data-metakey'), 114 container = $('.entries #postid-' + postid + ' .media-content'); 115 116 container.parent().addClass('content-loading').removeClass('content-added'); 117 118 $.ajax({ 119 120 cache: false, 121 timeout: 8000, 122 url: ti_async.ti_ajax_url, 123 type: 'POST', 124 data: ({ 125 action: 'load_custom_field_data', 126 ti_nonce: ti_async.ti_nonce, 127 postid: postid, 128 metakey: metakey 129 }), 130 131 success: function (data, textStatus, jqXHR) { 132 133 var $response = $(data); 134 135 container.parent().addClass('content-added'); 136 container.html($response); 137 container.find('iframe').each(function() { 138 var videosrc = $(this).attr('src'); 139 140 if ( videosrc.indexOf('vimeo.com') > -1 || videosrc.indexOf('youtube.com') > -1 ) { 141 $(this).attr('src', videosrc += '?&autoplay=1'); 142 143 } else if ( videosrc.indexOf('soundcloud.com') > -1 ) { 144 $(this).attr('src', videosrc += '?&auto_play=true'); 145 } 146 }); 147 148 } 149 150 }); 151 152 }); 153 154 }); 155 156});
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.