PageSourceSearch

https://cheapassignmentwriters.com/assets/scripts/functions.js?v=fde3

js cheapassignmentwriters.com collected 2026-09-26 08:41:43 UTC 20,465 bytes, 561 lines download raw bytes

1/**  jquery document.ready functions */
2jQuery(document).ready(function($) {
3
4    'use strict';
5    /* ------------------------------- Responsive Menu Start ------------------------------- */
6    if (jQuery('.main-navigation>ul').length != '') {
7        jQuery('.main-navigation>ul').slicknav();
8    }
9    /* ------------------------------- Responsive Menu Start ------------------------------- */
10
11    /* ------------------------------- Home Page Slider with header start ------------------------------- */
12    if (jQuery('.banner-transparent').length != '') {
13        jQuery('.banner-transparent').slick({
14            infinite: true,
15            slidesToShow: 1,
16            slidesToScroll: 1,
17            autoplay: true,
18        });
19    }
20
21    /* ------------------------------- Home Page Slider with header End --------------------------------- */
22
23    /* ------------------------------- Portfolio Slider start ------------------------------- */
24    if (jQuery('.portfolio-slider').length != '') {
25        jQuery('.portfolio-slider').slick({
26            infinite: true,
27            speed: 900,
28            autoplaySpeed: 1500,
29            slidesToShow: 4,
30            slidesToScroll: 1,
31            autoplay: true,
32            responsive: [{
33                breakpoint: 1170,
34                settings: {
35                    slidesToShow: 3,
36                    slidesToScroll: 1,
37                    infinite: true,
38
39                }
40            }, {
41                breakpoint: 813,
42                settings: {
43                    slidesToShow: 2,
44                    slidesToScroll: 1,
45                    dots: false,
46                }
47            }, {
48                breakpoint: 480,
49                settings: {
50                    slidesToShow: 1,
51                    slidesToScroll: 1,
52                    dots: false,
53                    arrows: false
54                }
55            }]
56        });
57    }
58    /* ------------------------------- Portfolio Slider End --------------------------------- */
59
60    /* ------------------------------- Testimonials Slider start ------------------------------- */
61    if (jQuery('.bu-testimonial-slider').length != '') {
62        jQuery('.bu-testimonial-slider').slick({
63            infinite: true,
64            arrows: false,
65            slidesToShow: 1,
66            slidesToScroll: 1,
67            autoplay: true,
68            dots: true
69        });
70    }
71    /* ------------------------------- Testimonials Slider End --------------------------------- */
72   /* ------------------------------- Logos carousel Start ------------------------------- */
73    if (jQuery('.logo-transparent').length != '') {
74        jQuery('.logo-transparent').slick({
75            infinite: true,
76            slidesToShow: 6,
77            slidesToScroll: 1,
78            autoplay: true,
79            autoplaySpeed: 2000,
80            arrows: false
81
82        });
83    }
84/* ------------------------------- Logos carousel End ------------------------------- */
85    /* ------------------------------- Top Search ------------------------------- */
86    jQuery(document).on('click', '.search-area a', function(e) {
87            e.preventDefault();
88            jQuery(this).siblings('form').toggle(500);
89        });
90
91    jQuery(document).on('click', '.search-area', function(){
92      jQuery(this).find(jQuery('.ti')).toggleClass('ti-search ti-close');
93    });
94    /* ------------------------------- Top Search ------------------------------- */
95
96    /* ------------------------------- Blog Detail slider start ------------------------------- */
97        if (jQuery('.blog-detail-slider').length != '') {
98            jQuery('.blog-detail-slider').slick({
99                infinite: true,
100                slidesToShow: 1,
101                slidesToScroll: 1,
102                autoplay: true,
103            });
104        }
105    /* ------------------------------- Blog Detail slider End --------------------------------- */
106
107    /* ------------------------------- Counter start ------------------------------- */
108       if (jQuery('.counter').length != '') {
109            jQuery('.counter').counterUp({
110                delay: 10,
111                time: 1000
112            });
113        }
114    /* ------------------------------- Counter End --------------------------------- */
115
116    /*LIghtBOx*/
117    jQuery(document).on('click', '[data-toggle="lightbox"]', function(event) {
118        event.preventDefault();
119        jQuery(this).ekkoLightbox();
120    });
121    /*LightBox*/
122
123    /*Sticky Header Function*/
124    jQuery(window).scroll(function() {
125        var scroll = jQuery(window).scrollTop();
126
127        if (scroll >= 155) {
128            jQuery('#header').addClass('fixed-header');
129        } else {
130            jQuery('#header').removeClass('fixed-header');
131        }
132    });
133    /*Sticky Header Function*/
134});
135/**  jquery document.ready functions */
136
137
138/* -------------------------------
139 * Window Load Funtion Start
140 ------------------------------- */
141 jQuery(window).on('load', function() {
142/* ------------------------------- Portfolio Filters End --------------------------------- */
143
144  /* activate jquery isotope */
145if (jQuery('#posts').length != '') {
146  var jQuerycontainer = jQuery('#posts').isotope({
147    itemSelector: '.item',
148    isFitWidth: true
149  });
150
151  jQuery(window).smartresize(function() {
152    jQuerycontainer.isotope({
153      columnWidth: '.col-sm-3'
154    });
155  });
156
157  jQuerycontainer.isotope({ filter: '*' });
158
159  // filter items on button click
160
161  jQuery('#filters').on('click', 'button', function() {
162    var filterValue = jQuery(this).attr('data-filter');
163    jQuerycontainer.isotope({ filter: filterValue });
164  });
165}
166/* ------------------------------- Portfolio Filters End --------------------------------- */
167
168  /* ------------------------------- Portal price check Start --------------------------------- */
169    jQuery(document).ready(function(){
170  jQuery(".spin-btn-plus").click(function(){
171    var parent = jQuery(this).parent().parent().parent().parent().parent();
172    var elem = parent.find(".length");
173    var val = parseInt(elem.val()) + 1;
174
175    console.log(parent.find(".education").val());
176    if(parent.find(".education").val() === ""){
177        return;
178    }
179
180    if(val == 250){
181      val = 250;
182    }
183
184    if(val > 250){
185      val = 250;
186    }
187    elem.val(val);
188
189    getPrice();
190  });
191  jQuery(".spin-btn-minus").click(function(){
192    var parent = jQuery(this).parent().parent().parent().parent().parent();
193    var elem = parent.find(".length");
194    var val = elem.val() - 1;
195
196    if(parent.find(".education").val() === ""){
197        return;
198    }
199
200    if(val === 0){
201      val = 0;
202    }
203
204    if(val < 1){
205      val = 1;
206    }
207    elem.val(val);
208
209    getPrice();
210  });
211
212  /* Portal price check */
213  var priceCheckForm = jQuery(".portalPriceCheckForm"),
214      url = "https://cheapassignmentwriters.com/portal";
215
216  jQuery.ajax({
217      type: "get",
218      url: url+"/init",
219      beforeSend: start_ajax(),
220      dataType: "json",
221      success: function(data){
222          var worktype_el = "";
223          var subjects_el = "";
224          var edulevel_el = "";
225          var urgency_el = "";
226          
227          jQuery.each(data.worktypes, function(key, worktype){
228              worktype_el += '<option value="'+worktype.id+'">
228'+worktype.name+'</option>';
229          });
230          
231          jQuery.each(data.subjects, function(key, subject){
232              subjects_el += '<option value="'+subject.id+'">'+subject.name+'</option>';
233          });
234          
235          jQuery.each(data.edu_levels, function(key, edu_level){
236              edulevel_el += '<option value="'+edu_level.id+'">'+edu_level.level+'</option>';
237          });
238          
239          jQuery.each(data.urgency, function(key, urgency){
240              urgency_el += '<option value="'+urgency.id+'">'+urgency.time+' '+urgency.qualifier+'</option>';
241          });
242          
243          jQuery(".doc_name").html(worktype_el);
244          jQuery(".doc_subject").html(subjects_el);
245          jQuery(".education").html(edulevel_el);
246          jQuery(".urgency").html(urgency_el);
247          
248          getPrice();
249          end_ajax();
250      }
251  });
252
253    jQuery( document ).ajaxError(function() {
254        end_ajax();
255    });
256    
257    function getPrice(){
258        var worktype = jQuery(".doc_name").val();
259        var subject = jQuery(".doc_subject").val();
260        var edu_level = jQuery(".education").val();
261        var deadline = jQuery(".urgency").val();
262        var pages = jQuery(".length").val();
263        
264        jQuery.ajax({
265          type: "post",
266          url: url+"/price",
267          data: {worktype: worktype, subject: subject, edu_level: edu_level, pages:pages, deadline: deadline},
268          beforeSend: start_ajax(),
269          dataType: "json",
270          success: function(data){
271              if(data.status == "ok"){
272                  jQuery(".amt_paid").html("$"+data.price);
273              }
274              end_ajax();
275          }
276      });
277    }
278    
279    jQuery(".doc_name, .doc_subject, .education, .urgency").change(function(){
280        getPrice();
281    });
282    
283    jQuery(".proceed").click(function(){
284         var parent = jQuery(this).parent().parent().parent().parent().parent().parent();
285        //  console.log(parent);
286        //  parent.find(".portalPriceCheckForm").submit();
287        parent.submit();
288      });
289
290
291//   jQuery(".doc_name").change(function(){
292//       var parent = jQuery(this).parent().parent().parent().parent().parent();
293//       console.log(parent);
294//       var doc_id = parent.find(".doc_name").val();
295
296//       if(doc_id !='')
297//       {
298//         start_ajax(parent);
299//         jQuery.post(url+'/Welcome/getDocumentDetails', {doc_id: doc_id}, function(data){
300//           var obj = jQuery.parseJSON( data );
301//           parent.find(".subject_area").html(obj.sub_area);
302//           parent.find(".cost_per_page").val("$"+parseFloat(obj.base_price).toFixed(2));
303//           parent.find(".cpp").val("$"+parseFloat(obj.base_price).toFixed(2));
304//           parent.find(".amt_paid").html("$"+parseFloat(obj.base_price).toFixed(2));
305//           parent.find(".amt").val("$"+parseFloat(obj.base_price).toFixed(2));
306//           parent.find(".updated_price").val(parseFloat(obj.base_price).toFixed(2));
307//           parent.find(".education").html(obj.edu_name);
308//           parent.find(".length").val('1');
309//           parent.find(".urgency").html(obj.urgency);
310//           parent.find(".lengthtype").val(obj.lengthtype);
311
312//           parent.find(".subject_area").prop("disabled", false);
313
314//           end_ajax(parent);
315//          });
316
317
318//          //reset start herer
319//          parent.find('.doc_subject').prop('selectedIndex',0);
320//       }
321//       else
322//       {     //alert('lol');
323//         //reset
324//          parent.find('.doc_subject').prop('selectedIndex',0);
325//          parent.find('.subject_area').prop('selectedIndex',0);
326//          parent.find('.education').prop('selectedIndex',0);
327//          parent.find('.length').val('1');
328
329//          parent.find('.amt_paid').html('$0.00');
330//          parent.find(".amt").val("$0.00");
331//          parent.find(".cpp").val('$0.00');
332//          parent.find(".input_date_estimate").val('0 Days');
333//       }
334//   });
335
336//   jQuery(".subject_area").change(function(){
337//       var parent = jQuery(this).parent().parent().parent().parent().parent();
338//       var subdoc_id = parent.find(".doc_name").val();
339//       var subarea_id = parent.find(".subject_area").val();
340
341//         start_ajax(parent);
342//         jQuery.post(url+'/Welcome/getDocumentDetails', {subdoc_id: subdoc_id, subarea_id: subarea_id}, function(data){
343//         parent.find(".doc_subject").html(data);
344
345//         parent.find(".doc_subject").prop("disabled", false);
346
347//         end_ajax(parent);
348//       });
349//       //reset start herer
350
351//       parent.find('.education').prop('selectedIndex',0);
352//       parent.find('.urgency').prop('selectedIndex',0);
353//       parent.find('.length').val('1');
354//   });
355
356//   jQuery(".doc_subject").change(function(){
357//       var parent = jQuery(this).parent().parent().parent().parent().parent();
358//       var doc_id = parent.find(".doc_name").val();
359//       var subarea_id = parent.find(".subject_area").val();
360//       var doc_subject = parent.find(".doc_subject").val();
361//       var urgency = parent.find(".urgency").val();
362
363//         start_ajax(parent);
364//         jQuery.post(url+'/Welcome/getDocumentDetails', {s_doc_id: doc_id, s_doc_subject: doc_subject, s_subarea_id: subarea_id, s_urgency: urgency}, function(data){
365//         var obj = jQuery.parseJSON(data);
366
367//         parent.find(".amt_paid").html("$"+parseFloat(obj.after_subject_price).toFixed(2));
368//         parent.find(".amt").val("$"+parseFloat(obj.after_subject_price).toFixed(2));
369//         parent.find(".updated_price").val(parseFloat(obj.after_subject_price).toFixed(2));
370//         parent.find(".input_date_estimate").val(obj.estimated_time);
371
372//         parent.find(".education").prop("disabled", false);
373
374//         end_ajax(parent);
375//       });
376//       //reset start herer
377//       parent.find('.education').prop('selectedIndex',0);
378//       parent.find('.length').val('1');
379//       parent.find('.urgency').prop('selectedIndex',0);
380//   });
381
382//   jQuery(".education").change(function(){
383//       var parent = jQuery(this).parent().parent().parent().parent().parent();
384//       var doc_id = parent.find(".doc_name").val();
385//       var subarea_id = parent.find(".subject_area").val();
386//       var doc_subject = parent.find(".doc_subject").val();
387//       var education = parent.find(".education").val();
388//       var updated_price = parent.find(".updated_price").val();
389
390//             start_ajax(parent);
391//       jQuery.post(url+'/Welcome/getDocumentDetails', {e_doc_id: doc_id, e_doc_subject: doc_subject, e_subarea_id: subarea_id, e_education: education, e_updated_price: updated_price}, function(data){
392
393//       parent.find(".amt_paid").html("$"+parseFloat(data).toFixed(2));
394//       parent.find(".amt").val("$"+parseFloat(data).toFixed(2));
395//       parent.find(".updated_price").val(parseFloat(data).toFixed(2));
396//       parent.find(".cost_per_page").val("$"+parseFloat(data).toFixed(2));
397//       parent.find(".cpp").val("$"+parseFloat(data).toFixed(2));
398
399//       parent.find(".urgency").prop("disabled", false);
400
401//       end_ajax(parent);
402//      });
403//      //reset start herer
404//      parent.find('.urgency').prop('selectedIndex',0);
405//      parent.find('.length').val('1');
406//   });
407
408//   jQuery(".length").keyup(edu_level_changed(jQuery(this).parent().parent().parent().parent().parent()));
409
410//   function edu_level_changed(parent){
411//   var length_type = parent.find(".length").val();
412//   if(length_type != ""){
413//       var doc_id = parent.find(".doc_name").val();
414//       var subarea_id = parent.find(".subject_area").val();
415//       var doc_subject = parent.find(".doc_subject").val();
416//       var education = parent.find(".education").val();
417//       var updated_price = parent.find(".updated_price").val();
418
419//       var urgency = parent.find(".urgency").val();
420
421//         start_ajax(parent);
422//         jQuery.post(url+'/Welcome/getDocumentDetails', {l_doc_id: doc_id, l_doc_subject: doc_subject, l_subarea_id: subarea_id, l_education: education, l_updated_price: updated_price, l_length_type: length_type, l_urgency: urgency}, function(data){
423//         var obj2 = jQuery.parseJSON( data );
424
425//         parent.find(".amt_paid").html("$"+parseFloat(obj2.length_price).toFixed(2));
426//         parent.find(".amt").val("$"+parseFloat(obj2.length_price).toFixed(2));
427//         parent.find(".updated_price").val(parseFloat(obj2.length_price).toFixed(2));
428//         parent.find(".urgency").html(obj2.urgency_time);
429//         parent.find(".input_date_estimate").val(obj2.estimated_time);
430//         parent.find(".cost_per_page").val("$"+parseFloat(obj2.length_cost_per_page).toFixed(2));
431//         parent.find(".cpp").val("$"+parseFloat(obj2.length_cost_per_page).toFixed(2));
432
433//         end_ajax(parent);
434//       });
435//     }
436//   }
437
438//   jQuery(".urgency").change(function(){
439//       var parent = jQuery(this).parent().parent().parent().parent().parent();
440//       var doc_id = parent.find(".doc_name").val();
441//       var subarea_id = parent.find(".subject_area").val();
442//       var doc_subject = parent.find(".doc_subject").val();
443//       var education = parent.find(".education").val();
444//       var updated_price = parent.find(".updated_price").val();
445//       var length_type = parent.find(".length").val();
446//       var spacing = 1;
447//       var urgency = parent.find(".urgency").val();
448
449//         start_ajax(parent);
450//         jQuery.post(url+'/Welcome/getDocumentDetails', {ur_doc_id: doc_id, ur_doc_subject: doc_subject, ur_subarea_id: subarea_id, ur_education: education, ur_updated_price: updated_price, ur_length_type: length_type, ur_spacing: spacing, ur_urgency: urgency}, function(data){
451//         var obj = jQuery.parseJSON(data);
452
453//         parent.find(".amt_paid").html("$"+parseFloat(obj.urgency_total_amt).toFixed(2));
454//         parent.find(".amt").val("$"+parseFloat(obj.urgency_total_amt).toFixed(2));
455//         parent.find(".updated_price").val(parseFloat(obj.urgency_total_amt).toFixed(2));
456//         parent.find(".cost_per_page").val("$"+parseFloat(obj.urgency_cost_per_page).toFixed(2));
457
458//         parent.find(".cpp").val("$"+parseFloat(obj.urgency_cost_per_page).toFixed(2));
459//         parent.find(".input_date_estimate").val(obj.estimated_time);
460
461//         end_ajax(parent);
462//       });
463//   });
464
465//   jQuery(".proceed").click(function(){
466//      var parent = jQuery(this).parent().parent().parent().parent().parent().parent();
467//     //  console.log(parent);
468//     //  parent.find(".portalPriceCheckForm").submit();
469//     parent.submit();
470//   });
471
472  function start_ajax(parent){
473    if(parent){
474    	parent.parent().find(".price-check-loader2").addClass("price-check-overlay").html('<i class="fa fa-spin fa-spinner fa-3x price-check-loader"></i>');
475    }else{
476    	jQuery(".price-check-loader2").addClass("price-check-overlay").html('<i class="fa fa-spin fa-spinner fa-3x price-check-loader"></i>');
477    }
478  }
479
480  function end_ajax(parent){
481    if(parent){
482    	parent.parent().find(".price-check-loader2").removeClass("price-check-overlay").html('');
483    }else{
484    	jQuery(".price-check-loader2").removeClass("price-check-overlay").html('');
485    }
486  }
487
488  function size_module(){
489    var cont_width = jQuery(".price-check-wrapper-horizontal").parent().parent().width(),
490        elem_width = cont_width / 7;
491
492    if(elem_width < 133){
493      var i = 3;
494      var new_width = cont_width / i;
495      while(new_width < 133){
496        i--;
497        new_width = cont_width / i;
498      }
499      jQuery(".hb-form-field").css('width', new_width);
500      jQuery(".hb-submit").css('width', '100%');
501      jQuery(".custom_btn .right-part").css('padding-top', '8px');
502    }else{
503      jQuery(".hb-form-field").css('width', elem_width);
504      jQuery(".hb-submit").css('width', elem_width);
505      jQuery(".custom_btn .right-part").css('padding-top', '');
506    }
507  }
508  size_module();
509  jQuery(window).resize(size_module);
510
511  //$("#freewall").html(html);
512
513      // var wall = new Freewall(".hb-form-table");
514      // wall.reset({
515      //   selector: '.hb-elem',
516      //   animate: true,
517      //   cellW: 150,
518      //   cellH: 20,
519      //   fixSize: 0,
520      //   gutterY: 5,
521      //   gutterX: 5,
522      //   onResize: function() {
523      //     //wall.refresh();
524      //     wall.fitWidth();
525      //   }
526      // });
527      // var wall = new Freewall(".hb-form-table");
528      // wall.reset({
529      //   selector: '.hb-elem',
530      //   animate: true,
531      //   cellW: 135,
532      //   cellH: 'auto',
533      //   gutterY: 5,
534      //   gutterX: 5,
535      //   onResize: function() {
536      //     //wall.refresh();
537      //     wall.fitWidth();
538      //   }
539      // });
540
541      // wall.fitWidth();
542      // // for scroll bar appear;
543      // jQuery(window).trigger("resize");
544
545});
546
547
548/* Portal price check */
549
550
551  /* ------------------------------- Portal price check End --------------------------------- */
552  jQuery(".faq .panel-title a").click(function(){
553    let id = jQuery(this).attr("href");
554    jQuery(".faq .panel-title a").not(jQuery(this)).addClass("collapsed");
555    jQuery(".faq .panel-collapse").not(id).removeClass("in");
556  });
557});
558
559/* -------------------------------
560 * Window Load Funtion End
561 -------------------------------  */

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.