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.
This website uses cookies

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.

Cookies are small text files that can be used by websites to make a user's experience more efficient.

The law states that we can store cookies on your device if they are strictly necessary for the operation of this site. For all other types of cookies we need your permission. This means that cookies which are categorized as necessary, are processed based on GDPR Art. 6 (1) (f). All other cookies, meaning those from the categories preferences and marketing, are processed based on GDPR Art. 6 (1) (a) GDPR.

This site uses different types of cookies. Some cookies are placed by third party services that appear on our pages.

You can at any time change or withdraw your consent from the Cookie Declaration on our website.

Learn more about who we are, how you can contact us and how we process personal data in our Privacy Policy.

Please state your consent ID and date when you contact us regarding your consent.