1// this worked for me
2https://www.workversatile.com/jquery-to-javascript-converter/
1$(document).ready(function () {
2$('#dtBasicExample').DataTable({
3"searching": false // false to disable search (or any other option)
4});
5$('.dataTables_length').addClass('bs-select');
6})
1$('.moveNextCarousel').click(function(e){
2 e.preventDefault();
3 e.stopPropagation();
4 $('.carousel').carousel('next');
5});
1var wrap = $("#wrap");
2
3wrap.on("scroll", function(e) {
4
5 if (this.scrollTop > 147) {
6 wrap.addClass("fix-search");
7 } else {
8 wrap.removeClass("fix-search");
9 }
10
11});
1 $('textarea#champ').keyup(updateCount);
2 $('textarea#champ').keydown(updateCount);
3
4 function updateCount() {
5 var Length = $("textarea#champ").val().length;
6 var AmountLeft = maxLen - Length;
7 $('#restants').text(AmountLeft);
8 if(Length > maxLen){
9 $('#restants').addClass("red");
10 $("button#tweet").attr('disabled', 'disabled');
11 }
12 else {
13 $('#restants').removeClass("red");
14 $("button#tweet").removeAttr('disabled', 'disabled');
15
16 }
17
18
19 }
1 $(".box-toggle").on("click", function() {
2
3
4
5 if($(this).parent('.upm_poles').hasClass('active'))
6 {
7 $(this).parent('.upm_poles').removeClass('active');
8 }else{
9
10 jQuery(".upm_poles").removeClass('active');
11 $(this).parent(".upm_poles").toggleClass("active");
12 }
13 return false;
14
15
16 });
1// Cache our vars for the fixed sidebar on scroll
2var $sidebar = $('#sidebar-nav');
3
4// Get & Store the original top of our #sidebar-nav so we can test against it
5var sidebarTop = $sidebar.position().top;
6
7// Edit the `- 10` to control when it should disappear when the footer is hit.
8var blogHeight = $('#content').outerHeight() - 10;
9
10// Add the function below to the scroll event
11$(window).scroll(fixSidebarOnScroll);
12
13// On window scroll, this fn is called (binded above)
14function fixSidebarOnScroll(){
15
16 // Cache our scroll top position (our current scroll position)
17 var windowScrollTop = $(window).scrollTop();
18
19 // Add or remove our sticky class on these conditions
20 if (windowScrollTop >= blogHeight || windowScrollTop <= sidebarTop){
21 // Remove when the scroll is greater than our #content.OuterHeight()
22 // or when our sticky scroll is above the original position of the sidebar
23 $sidebar.removeClass('sticky');
24 }
25 // Scroll is past the original position of sidebar
26 else if (windowScrollTop >= sidebarTop){
27 // Otherwise add the sticky if $sidebar doesnt have it already!
28 if (!$sidebar.hasClass('sticky')){
29 $sidebar.addClass('sticky');
30 }
31 }
32}
1(function( $ ){
2
3 //Define o padding top do body
4 var altura = $('.wpbf-page-header').height();
5
6 //Eventos do scroll
7 $(window).scroll(function(){
8
9 var topPos = $(this).scrollTop();
10
11 if(topPos > 100){
12
13 var novaaltura = $('.wpbf-page-header').height();
14
15 $('body').css('padding-top', novaaltura+'px');
16 $('.wpbf-pre-header').slideUp();
17 $('.wpbf-logo img').css('width', '50%');
18
19 }else{
20
21 $('body').css('padding-top', altura+'px');
22 $('.wpbf-pre-header').slideDown();
23 $('.wpbf-logo img').css('width', '100%');
24
25 }
26
27 });
28
29 var data = new Date();
30
31 $('#ano').html(data.getFullYear());
32
33 $('#btn-whatsapp .elementor-icon').click(function(){
34 $('.joinchat').addClass('joinchat--chatbox');
35 });
36
37 $('.joinchat__close').click(function(){
38 $('.joinchat').removeClass('joinchat--chatbox');
39 });
40
41})( jQuery );
42
43