1(function ($) { 2 $(function () { 3 /* **** Slider Option **** */ 4 var duration = $('.notify_slider').data('slide-duration'); 5 var transition = $('.notify_slider').data('slide-transition'); 6 var controls = $('.notify_slider').data('slide-controls'); 7 if(controls == 1){var control = true;}else{var control = false;} 8 $('.notify_slider').bxSlider({ 9 auto: true, 10 controls:control, 11 pager:false, 12 speed: duration, 13 pause: transition, 14 stopAuto: false, 15 nextText:"<i class='fa fa-angle-right'></i>", 16 prevText:"<i class='fa fa-angle-left'></i>" 17 });// Slider Option End 18 19 /* **** Ticker Option **** */ 20 var ticker_hover = $('.edn-ticker-slider').data('ticker-hover'); 21 //alert(ticker_hover); 22 var ticker_speed = $('.edn-ticker-slider').data('ticker-speed'); 23 $('.edn-ticker').marquee({ 24 speed: ticker_speed, 25 gap: 0, 26 delayBeforeStart: 0, 27 direction: 'left', 28 duplicated: true, 29 pauseOnHover: ticker_hover, 30 });// Ticker Option End 31 32 var valid = 1; 33 $('#edn_subs_submit_ajax').click(function(e){ 34 e.preventDefault(); 35 var email = $('.edn-type-newsletter-wrap input[name="edn_email"]').val(); 36 var nonce = $('.edn-type-newsletter-wrap input[name="edn_subs_nonce_field"]').val(); 37 if(email == '') 38 { 39 valid = 0; 40 $('.error').html('Email Address Required'); 41 } 42 else 43 { 44 var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/; 45 if( !emailReg.test( email ) ) { 46 var valid_msg = $('#edn-msg').data('valid-msg'); 47 $('.error').html(valid_msg); 48 }else{ 49 var success = $('#edn-msg').data('success'); 50 var already = $('#edn-msg').data('aready-subs'); 51 var check_to_conform = $('#edn-msg').data('check-conform'); 52 //var ajaxurl = $('#edn-ajax-url').data('url'); 53 $.ajax({ 54 url: ajaxsubs.ajaxurl, 55 type: 'post', 56 dataType: 'html', 57 data: { 58 action:'ajax_subscribe', 59 email: email, 60 nonce: nonce, 61 }, 62 beforeSend: function() { 63 $('#edn-loading').show('slow'); 64 }, 65 complete: function() { 66 $('#edn-loading').hide('slow'); 67 }, 68 success: function( resp ) { 69 //alert(resp); 70 if(resp == '0') 71 { 72 $('.error').html(already); 73 }else if(resp=='1'){ 74 $('.error').html(check_to_conform); 75 }else{ 76 $('.error').html(success); 77 } 78 } 79 }); 80 } 81 } 82 });//end subscribe submit by ajax 83 84 /* Notification bar show and hide */ 85 $('.edn-top-up-arrow').click(function(){ 86 $(this).hide(); 87 $(this).next().show(); 88 $(this).parent().parent().prev().slideUp(); 89 $('body').css('padding-top',0); 90 }); 91 $('.edn-top-down-arrow').click(function(){ 92 $(this).hide(); 93 $(this).prev().show(); 94 $(this).parent().parent().prev().slideDown(); 95 var totalHeightt = $(this).parent().parent().prev().find('.edn_container_wrapper').outerHeight(); 96 $('body').css('padding-top',totalHeightt); 97 }); 98 $('.edn-bottom-down-arrow').click(function(){ 99 $(this).hide(); 100 $(this).next().show(); 101 $(this).parent().parent().prev().slideUp(); 102 }); 103 $('.edn-bottom-up-arrow').click(function(){ 104 $(this).hide(); 105 $(this).prev().show(); 106 $(this).parent().parent().prev().slideDown(); 107 });//End of Notification bar show and hide 108 /* Notification bar Close */ 109 110
111 if(ajaxsubs.check_show_once == 1 && ajaxsubs.control_type != 1){ 112 //user if click on close not to display again. 113 var Flag = 1; 114 var controltype =ajaxsubs.control_type; 115 116 }else{ 117 var Flag = 0; 118 var controltype =ajaxsubs.control_type; 119 120 } 121 // close button for notificatio bar top 122 $('.edn-controls-close').click(function(){ 123 //var vals = 'edn_close'; 124 if(controltype == 3){ 125 if(Flag == 1){ 126 edn_checkCookie(1); //set cookie for 1 day 127 }else{ 128 edn_delete_cookie('setcookie_time'); 129 } 130 }else{ 131 edn_delete_cookie('setcookie_time'); 132 } 133 $('.edn_close_section').hide('slow'); 134 }); 135 if(controltype != 3){ 136 edn_delete_cookie('setcookie_time'); 137 } 138 function edn_delete_cookie(name) { 139 document.cookie = name + '=;expires=Thu, 01 Jan 1970 00:00:01 GMT;'; 140 } 141 142 function edn_checkCookie(ndays) { 143 var cookie = edn_getCookie("setcookie_time"); 144 if (cookie != "") { 145 //cookie is set 146 } else { 147 cookie = 'set_cookie'; 148 if (cookie != "" && cookie != null) { 149 edn_setCookie("setcookie_time", cookie, ndays); 150 } 151 } 152 } 153 154 //set cookie for 1 day 155 function edn_setCookie(cookieName,cookieValue,nDays) { 156 var today = new Date(); 157 var expire = new Date(); 158 if (nDays==null || nDays==0) nDays=1; 159 expire.setTime(today.getTime() + 3600000*24*nDays); 160 document.cookie = cookieName+"="+escape(cookieValue) 161 + ";expires="+expire.toGMTString(); 162 } 163 function edn_getCookie(cname) { 164 var name = cname + "="; 165 var ca = document.cookie.split(';'); 166 for (var i = 0; i < ca.length; i++) { 167 var c = ca[i]; 168 while (c.charAt(0) == ' ') 169 c = c.substring(1); 170 if (c.indexOf(name) == 0) { 171 return c.substring(name.length, c.length); 172 } 173 } 174 return ""; 175 } 176 177 178 $('.edn-notify-bar').each(function(){ 179 if($(this).hasClass('edn-position-Top')){ 180 var totalHeight = $(this).outerHeight(); 181 $('body').css('padding-top',totalHeight); 182 }else{ 183 $('body').css('padding-top',0); 184 } 185 }); 186 187 });//$(function () end 188}(jQuery));
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.