Update

Hello, I updated the theme today and most of my JavaScript code I added is not working and I lost some of my CSS files. Is there any way I can fix the problem even if I have to restore the previous version theme. I believe the problem has something to do with jQuery version. Let me know if you update jQuery with the new theme version or if there is anyway I get my code to work again. 

Thank you. 

Comments

  • Hi,
    If you're customizing Theme Files, then remember to use a Child Theme.
    All of your customizations will not be removed if you will use it:
    https://codex.wordpress.org/Child_Themes

    We use the same version of jQuery as Wordpress uses, so we will not be able to change the version of jQuery until WP change it.

    Also, we can do nothing about your loss, please ask
    your hosting provider, maybe he has some backups.
    Thanks
  • I recover the lost of the CSS files but the problem is with the jQuery code it's the same from the old version but it's not working on this version. 

    This is one of the codes.
    <script>      
           $('#thunbs- button').click(function(){
          $('#largImg-').attr('src',$(this).attr('src').replace('thunb','larg'));
          $('#description').html($(this).attr('alt'));
        }); 
    </script>

    This is the error I get "Uncaught TypeError: $ is not a function"
    I added (function ($) {            before the code which fixed the error on the console but the function is still not working. 
  • I cannot help you with JS scripts.
    We support only simple CSS codes.

    Also, if you provide this code into Theme Options > Custom CSS & JS > JS,
    then notice, that $ must be replaced with jQuery, look: http://prntscr.com/loehvt
    Thanks
Sign In or Register to comment.