PageSourceSearch

https://www.proprofs.com/c/wp-content/themes/bateaux/proprofs_header/js/custom_header.js?v=30

js proprofs.com collected 2026-09-24 07:02:17 UTC 15,550 bytes, 384 lines download raw bytes

1function tweet_text(x, clickit)
2    {
3    	attr_id=clickit.id;
4    	twitter_handle=clickit.getAttribute("twitter");
5    	
6    	post_url=window.location.href;
7        var twitterURL = x + " " + post_url + "#" + attr_id + " @proprofs "+twitter_handle;
8        var openLink = 'https://twitter.com/intent/tweet?text=' + encodeURIComponent(twitterURL);
9        winWidth    = 650;  
10        winHeight   = 450;
11        winLeft     = (jQuery(window).width()  - winWidth)  / 2,
12        winTop      = (jQuery(window).height() - winHeight) / 2, 
13        winOptions   = 'width='  + winWidth  + ',height=' + winHeight + ',top='    + winTop    + ',left='   + winLeft;
14        
15        window.open(openLink,'Share This Link',winOptions);
16        return false;   
17    }
18
19    jQuery(window).scroll(function() {
20      // var bheight = jQuery(document).height()-800;
21      // if (jQuery(this).scrollTop() > bheight) {
22      //   jQuery("li#text-4").hide();
23      // }
24      // else{
25      //    jQuery("li#text-4").show(); 
26      // }
27      var sidebar_height = jQuery('.btx-sidebar').height();
28      sidebar_height = sidebar_height + 100;
29      if (jQuery(this).scrollTop() > sidebar_height) {
30          body_scroll=jQuery(this).scrollTop();
31          jQuery( ".lead-trial" ).addClass( "sticky-lead" );
32          jQuery( ".lead-trial" ).css( 'top', body_scroll+'px');
33      }
34      else
35      {
36         jQuery( ".lead-trial" ).removeClass( "sticky-lead" );
37      }
38    });
39
40    jQuery('#toc-status').on('click', function(){
41        if(jQuery(this).hasClass('show-active')){
42          jQuery(this).removeClass('show-active');
43          jQuery('.toc-description').hide();
44          jQuery(this).text('Show');
45        }
46        else{
47          jQuery(this).addClass('show-active');
48          jQuery('.toc-description').show();
49          jQuery(this).text('Hide');
50        }
51    });
52
53    jQuery('.toc-description a').on('click', function(event){
54      debugger;
55        event.stopPropagation();
56        var target = jQuery(this).attr('target');
57        if(target!='' || target!=undefined){
58          jQuery('html, body').animate({
59            scrollTop: jQuery("#"+target).offset().top - 100
60          });
61        }
62        return false;
63    });
64    
65      
66    jQuery('body.home li#text-4').css('display','none');
67    jQuery('body.category-news-and-updates li#text-4').css('display','none');
68
69    // jQuery('body.category-knowledge-management .lead-trial img.lead_img').attr("src","https://www.proprofs.com/c/wp-content/uploads/2017/05/Knowledgebase.png");
70    jQuery('body.category-customer-support .lead-trial a.lead_url').attr("href","https://www.proprofschat.com/signup/");
71    jQuery('body.category-customer-support .lead-trial .lead-banner').css('background-image', 'url(https://www.proprofs.com/c/wp-content/uploads/2017/05/Chat.png)');
72 /*   jQuery('body.category-customer-support .footer-menu a.wrte-us-btn').attr("href","https://www.proprofs.com/c/submit-customer-support-article/");
73    jQuery('.customer-support_category .footer-menu a.wrte-us-btn').attr("href","https://www.proprofs.com/c/submit-customer-support-article/");*/
74
75    jQuery('body.category-lms .lead-trial a.lead_url').attr("href","https://www.proprofs.com/training/create-a-course/");
76    jQuery('body.category-lms .lead-trial .lead-banner').css('background-image', 'url(https://www.proprofs.com/c/wp-content/uploads/2017/05/Training-maker.png)');
77   /* jQuery('body.category-lms .footer-menu a.wrte-us-btn').attr("href","https://www.proprofs.com/c/submit-an-elearning-article/");
78    jQuery('.lms_category .footer-menu a.wrte-us-btn').attr("href","https://www.proprofs.com/c/submit-an-elearning-article/");
79*/
80
81    jQuery('body.category-project .lead-trial a.lead_url').attr("href","https://www.proprofs.com/project/signup/");
82    jQuery('body.category-project .lead-trial .lead-banner').css('background-image', 'url(https://www.proprofs.com/c/wp-content/uploads/2017/05/Project.png)');
83 /*   jQuery('body.category-project .footer-menu a.wrte-us-btn').attr("href","https://www.proprofs.com/c/submit-project-management-article/");
84    jQuery('.project_category .footer-menu a.wrte-us-btn').attr("href","https://www.proprofs.com/c/submit-project-management-article/");*/
85
86    jQuery('body.category-knowledge-management .lead-trial a.lead_url').attr("href","https://www.proprofskb.com/register/");
87    jQuery('body.category-knowledge-management .lead-trial .lead-banner').css('background-image', 'url(https://www.proprofs.com/c/wp-content/uploads/2017/05/Knowledgebase.png)');
88/*
89    jQuery('body.category-knowledge-management .footer-menu a.wrte-us-btn').attr("href","https://www.proprofs.com/c/write-for-us/");
90*/
91/*
92    jQuery('.knowledge-management_category .footer-menu a.wrte-us-btn').attr("href","https://www.proprofs.com/c/write-for-us/");
93*/
94
95    // if(window.location.href.indexOf("/c/category/customer-support/") > -1 ){  
96    //   jQuery(".lead-trial img.lead_img").attr("src","https://www.proprofs.com/c/wp-content/uploads/2017/05/Chat.png");
97    //   jQuery(".lead-trial a.lead_url").attr("href","https://www.proprofs.com/chat/signup/");
98    // }
99    // else if(window.location.href.indexOf("/c/category/knowledge-management/") > -1 ){
100    //   debugger;
101    //   jQuery('li#text-4').css('display','block');
102    //   jQuery(".lead-trial img.lead_img").attr("src","https://www.proprofs.com/c/wp-content/uploads/2017/05/Knowledgebase.png");
103    //   jQuery(".lead-trial a.lead_url").attr("href","https://www.proprofskb.com/register/");
104    //   jQuery('.lead-trial').show();
105    // }
106    // else if(window.location.href.indexOf("/c/category/lms/") > -1 ){
107    //   jQuery('li#text-4').css('display','block');
108    //   jQuery(".lead-trial img.lead_img").attr("src","https://www.proprofs.com/c/wp-content/uploads/2017/05/Training-maker.png");
109    //   jQuery(".lead-trial a.lead_url").attr("href","https://www.proprofs.com/training/create-a-course/");
110    //   jQuery('.lead-trial').show();
111    // }
112    // else if(window.location.href.indexOf("/c/category/project/") > -1 ){
113    //   jQuery('li#text-4').css('display','block');
114    //   jQuery(".lead-trial img.lead_img").attr("src","https://www.proprofs.com/c/wp-content/uploads/2017/05/Project.png");
115    //   jQuery(".lead-trial a.lead_url").attr("href","https://www.proprofs.com/project/signup/");
116    //   jQuery('.lead-trial').show();
117    // }
118    // else{
119    //   jQuery('li#text-4').hide();
120    // }
121  jQuery(document).ready(function(){
122    jQuery('.comment-reply-link').html('<i class="fa fa-reply"></i>');
123
124    //write for us page
125    jQuery('body.home #writeUsFooter').remove();
126    jQuery('body.category-news-and-updates #writeUsFooter').remove();
127
128    var writeUrl=jQuery('div.write_us a').attr('href');
129    jQuery('#relativePostUrl a').attr('href', writeUrl);
130    jQuery('#writeUsFooter a').attr('href', writeUrl);
131    jQuery('span.btx-entry-author a').attr('rel','nofollow');
132    jQuery('div.btx-post-author a').attr('rel','nofollow');
133    // autor link no follow
134    var pathname = window.location.pathname;
135    //alert(pathname);
136   
137    
138  	//jQuery('li.try_free_button').hide();
139
140  	 jQuery('a[href^="http://"]').not('a[href*=proprofs]').attr('target','_blank');
141  	 jQuery('body.single .btx-post-content p img').siblings('br').remove();
142    	var page_url=window.location.href;
143    	var index = page_url.indexOf('/page/');
144
145    	var str="";
146    	for(var i=index; i<page_url.length;i++){
147    		str +=page_url[i];
148    	}
149      var home_url = page_url.replace(str, "");
150      if(home_url === 'https://www.proprofs.com/quiz-school/blog')
151      {
152        var home_url_val = 'https://www.proprofs.com/quiz-school/blog/';
153		}
154		else
155		{
156			var home_url_val = home_url;
157		}
158    	if(page_url.indexOf('/page/2')>-1)
159    	{
160    		jQuery('.btx-pagination ul.page-numbers').children('li').eq(0).children('a').attr('href', home_url_val);
161    		jQuery('.btx-pagination ul.page-numbers').children('li').eq(1).children('a').attr('href', home_url_val);
162    	}
163    	else if(page_url.indexOf('/page/')>-1)
164    	{
165        jQuery('.btx-pagination ul.page-numbers').children('li').eq(1).children('a').attr('href', home_url_val);
166      }
167    	jQuery(window).scroll(function(){
168
169        		var sticky = jQuery('nav.header .secondary_header '), scroll = jQuery(window).scrollTop();
170        		window_width=jQuery(window).width();
171        		if(window_width>992){
172          		if (scroll >= 39){
173            		sticky.addClass('header-fixed'); 
174            		jQuery('nav.header').css({"margin-top":"135px"})
175            		jQuery('.grey-bg').css({"display":'none'});
176          		  jQuery('li.try_free_button').show();
177          		} 
178          		else{
179            		sticky.removeClass('header-fixed');
180            		jQuery('nav.header').css({"margin-top":"0px"});
181            		jQuery('.grey-bg').css({"display":''});
182            		jQuery('li.try_free_button').hide();
183          		} 
184        		}
185		  });
186    	jQuery(".btx-search-form input[type=text]").keyup(function(e){
187    		
188            		var search_val=jQuery(this).val();
189            		if(search_val!='')
190            		{
191            			
192            			jQuery(this).siblings(".btx-search-form span").addClass("close_button");
193            		}
194            		else
195            		{
196
197            			jQuery(this).siblings(".btx-search-form span").removeClass("close_button");
198            			
199            		
200            		}
201       			});
202
203    		 jQuery(document).on("click", ".btx-search-form span.close_button", function () {
204    		 
205            	jQuery(this).siblings(".btx-search-form input[type=text]").val("");
206            	jQuery(this).removeClass("close_button");
207        	});
208
209
210
211    		jQuery(".btx-search-form input[type=text]").focus(function(){
212    	
213    			jQuery(this).addClass("border_color");
214    			jQuery(this).siblings(".btx-search-form span").addClass("border_color");
215    			
216    			});
217
218
219    		jQuery(".btx-search-form input[type=text]").blur(function(){
220    		
221    			jQuery(this).removeClass("border_color");
222    			jQuery(this).siblings(".btx-search-form span").removeClass("border_color");
223    			
224    			});
225          w_width=jQuery(window).width();
226          if(w_width>1024){
227            jQuery('li.dropdown').children('ul').hover(function(){
228            jQuery(this).stop().show(0);
229            },function(){
230            jQuery(this).stop().show(0).delay(500).hide(0);
231           });
232           jQuery('li.dropdown').hover(function(){
233            jQuery(this).children('a').children('span.caret').css('border-top-color','white');
234            jQuery('li.dropdown').children('ul').stop().hide(0);
235            jQuery('ul', this).stop().show(0);
236           },function(){
237            jQuery(this).children('a').children('span.caret').css('border-top-color','#546ea5');
238            jQuery('ul', this).stop().show(0).delay(500).hide(0);
239           });
240        }
241        if(w_width<1025){
242          function close_accordion_section() {
243              jQuery('li.dropdown .dropdown-toggle').removeClass('active');
244          }
245          jQuery('li.dropdown .dropdown-toggle').click(function(e) {
246              // Grab current anchor value
247              if(jQuery(e.target).is('.active')) {
248                  close_accordion_section();
249              }else {
250                  close_accordion_section();
251
252                  // Add active class to section title
253                  jQuery(this).addClass('active');
254                  // Open up the hidden content panel
255              }
256            e.preventDefault();
257          });
258        }
259        if(w_width>992){
260            jQuery(document).click(function(e){
261
262            if (jQuery(e.target).is('.search_li *, .single_search *')) {
263
264                        jQuery(".single_search").addClass('toggle').show();
265                    }
266            else{
267            jQuery(".single_search").removeClass('toggle').hide();
268            }
269
270          });
271          jQuery('.search_li').click(function(e){
272
273            e.stopPropagation();
274            if(jQuery(".single_search").hasClass('toggle')){
275            jQuery(".single_search").removeClass('toggle').hide();
276
277            }else{
278            jQuery(".single_search").removeClass('toggle').css('display','none');
279            jQuery(".single_search").addClass('toggle').show();
280            }
281
282          });
283        }
284
285	// debugger;
286        jQuery('.arrow_box').hide();
287        jQuery('.loder').hide();
288        jQuery('#newslatter_button').click(function(){
289          var email_value = jQuery('#news-search').val();
290          if(email_value  ==  '')
291          {
292            jQuery('.arrow_box').show();
293            jQuery('.arrow_box').html('Enter your email.');
294            return false;
295          }
296          if( !validateEmail(email_value))
297          {
298            jQuery('.arrow_box').show();
299            jQuery(".arrow_box").css("color", "#f00");
300            jQuery('.arrow_box').html('Email is invalid.');
301            return false;
302          }
303    
304          jQuery.ajax({
305              type: "POST",
306              url: "/api/newslatter/",
307              async:true,
308              data: 
309                { 
310                  email : email_value
311                },
312              beforeSend: function() 
313              {
314                jQuery('.loder').show();
315              },
316              success: function(data) 
317              {
318                if(data ==  1)
319                {
320                  jQuery('.loder').hide();
321                  jQuery('.arrow_box').show();
322                  jQuery(".arrow_box").css("color", "#26a65b");
323                  jQuery('.arrow_box').html("You've successfully subscribed.");
324                  jQuery('.news-search').html('');
325                }
326                if(data ==  0)
327                {
328                  jQuery('.loder').hide();
329                  jQuery('.arrow_box').show();
330                  jQuery(".arrow_box").css("color", "#F88528");
331                  jQuery('.arrow_box').html("You've already subscribed.");
332                  jQuery('.news-search').html('');
333                }
334              },
335              error: function(xhr) 
336              {
337                alert("Error occured.please try again");
338              }
339                   
340            });
341        });   
342  
343        jQuery('.news-search').focus(function(){
344          jQuery('.arrow_box').hide();
345        }); 
346
347       function validateEmail(email) {
348        var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
349        if( !emailReg.test( email ) ) {
350          return false;
351        } else {
352          return true;
353        }
354      } 
355
356      jQuery('ul.page-numbers').addClass('custom_pagination');	
357
358      jQuery(".btx-pagination span.page-numbers.dots").parent('li').css({"display": "none"});
359      jQuery(".btx-pagination span.page-numbers.current").parent('li').css({"background": "#3c8ac9"});
360      	jQuery('p.close_text').click(function(){
361  			// debugger;
362  		jQuery('a.tve_p_lb_close').click();
363  		});
364      if(jQuery(window).width() > 1200){
365        var lead_count=1;
366        jQuery(window).scroll(function() {
367          var lead_height = jQuery(document).height()-1000;
368          var h=jQuery(window).height()+jQuery(window).scrollTop();
369          var footer = jQuery('.btx-footer').position().top;
370          if(jQuery(window).scrollTop()>1000 && h-10<footer && lead_count==1)
371          {
372            jQuery('.fixed-lead').show();
373          }
374          else{
375          jQuery(".fixed-lead").hide();
376          }
377        });
378      }  
379      jQuery('#close-lead').click(function(){
380        lead_count=0;
381        jQuery('.fixed-lead').hide();
382      });
383
384  });

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.