New Landing How can we help? Themeforest Theme Support Neighborhood How/where do I add jQuery

Viewing 11 posts - 1 through 11 (of 11 total)
  • #109983
    cryx
    Member
    Post count: 49

    How do I add jQuery without disturbing the content that’s already there? For example I have a module that I have to change the html-text but I can’t get to it through the template php file so I thought of using a jQuery snippet. It works when I try it out in Jsfiddle.com but when I put it inside the header.php for example everything on the site that’s using javascript stops working. Where can I put this snippet without disturbing the content?

    #109988
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please go to Admin -> Theme Options -> General Options -> Custom JS -> Here you can insert your code.
    Example->

    <script>
    Your code
    </script>

    Thanks

    #110073
    cryx
    Member
    Post count: 49

    Hmm, I can’t find it. I have version 1.81. I can only find textarea for CSS code.

    Edit: Okay, is it the “Tracking Code” textarea?

    How should I write the code, I get errors in my browser if I use this:

    $(document).ready(function() {
    	var str = $('.product-tax').text().replace(/Incl VAT/g, '');
    	$('.product-tax').text(str);
    });

    This gives no error but nothing changes:

    (function() {
    	var str = $('.product-tax').text().replace(/Incl VAT/g, '');
    	$('.product-tax').text(str);
    });
    #110075
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    You can try to insert code at Google Analytic box.
    Thanks

    #110078
    cryx
    Member
    Post count: 49

    Hi, I edited my post above, don’t know if you saw that! ๐Ÿ™‚

    #110081
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    I dont have your website url. How is it possible?
    Thanks

    #110082
    cryx
    Member
    Post count: 49
    This reply has been marked as private.
    #110105
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    I dont see any text like Incl VAT at this page http://www.northicom.se/bilvard/butik/.
    Thanks

    #110197
    cryx
    Member
    Post count: 49

    Oh, forgot to mention. You have to press the button at the far left saying “Inkludera moms”. So all the products have VAT included. You’ll see that it says “[price] Inkl. Moms Incl VAT” It’s some bug with the module I have, so I need to get rid of that text.

    #110279
    cryx
    Member
    Post count: 49

    I fixed it now. It was a js file in the module that was causing the problem. I got a solution from the creator himself :). Thanks for your help though! ๐Ÿ™‚

    #110298
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    I’m glad that you managed to resolve issue.
    Thanks ๐Ÿ™‚
    With Best Regards
    Mohammad

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register