jQuery snippet don’t work in my wordpress theme

I’m building my portfolio website over a wordpress theme. In the page “about me”, i have made first in code pen. When i go to insert the code in my website, the jQuery effect don’t work and i don’t know what i must do.

The jQuery function is a “flip” effect when you click on “Currículo” button. How you can see here: http://codepen.io/FelipeMartinin/pen/sAtvD

Read More

This flip effect don’t work in my page: http://felipemartinin.com.br/acerca/

The jQuery src: http://felipemartinin.com.br/wp-content/themes/FelipeMartinin/js/portfolio.js

If anyone can help me I’m really grateful.

Thanks in adv

Related posts

Leave a Reply

2 comments

  1. Seem like there is a conflict here between jQuery and WordPress, try to put your code inside closure:

    (function($){
        $('.goFlip').on("click", function(){
        $('.aboutMe').toggleClass('rotate-3d');
        $('.card-back').toggleClass('z-up');
        $('.card-back > .aboutHeader > h2').addClass('fadeInUp');
        $('.backContent-wrap .backContent').addClass('fadeInUp');
      });
    })(jQuery);
    
  2. If you look into your console when loading the page, you’ll find, that it can’t load a lot of plugins (thats the 404 not found error):

    GET http://felipemartinin.com.br/wp-content/plugins/revslider/rs-plugin/css/captions.css?ver=3.8 404 (Not Found) felipemartinin.com.br/:37
    GET http://felipemartinin.com.br/wp-content/plugins/revslider/rs-plugin/css/settings.css?ver=3.8 404 (Not Found) felipemartinin.com.br/:36
    GET http://felipemartinin.com.br/wp-content/plugins/woocommerce/assets/css/woocommerce.css?ver=3.8 404 (Not Found) felipemartinin.com.br/:46
    GET http://felipemartinin.com.br/wp-content/plugins/revslider/rs-plugin/js/jquery.themepunch.plugins.min.js?ver=3.8 404 (Not Found) felipemartinin.com.br/:49
    GET http://felipemartinin.com.br/wp-content/plugins/revslider/rs-plugin/js/jquery.themepunch.revolution.min.js?ver=3.8 404 (Not Found) felipemartinin.com.br/:50
    GET http://felipemartinin.com.br/wp-content/plugins/woocommerce/assets/js/frontend/add-to-cart.min.js?ver=2.0.20 404 (Not Found) (index):601
    GET http://felipemartinin.com.br/wp-content/plugins/woocommerce/assets/js/jquery-blockui/jquery.blockUI.min.js?ver=2.60 404 (Not Found) (index):602
    GET http://felipemartinin.com.br/wp-content/plugins/woocommerce/assets/js/frontend/woocommerce.min.js?ver=2.0.20 404 (Not Found) (index):609
    GET http://felipemartinin.com.br/wp-content/plugins/woocommerce/assets/js/jquery-placeholder/jquery.placeholder.min.js?ver=2.0.20 404 (Not Found) (index):603
    GET http://felipemartinin.com.br/wp-content/plugins/woocommerce/assets/js/jquery-cookie/jquery.cookie.min.js?ver=1.3.1 404 (Not Found) (index):610
    GET http://felipemartinin.com.br/wp-content/plugins/woocommerce/assets/js/frontend/cart-fragments.min.js?ver=2.0.20 404 (Not Found) 
    

    First of all, you should avoid such errors. Then have a look, where the file lays on the server, and correct the paths.