New Landing How can we help? Themeforest Theme Support Dante Can't Insert Raw HTML / Raw JS

Viewing 8 posts - 1 through 8 (of 8 total)
  • Posted in: Dante
  • #50689
    ptrikutam
    Member
    Post count: 9

    I recently updated to the latest version of the Dante Theme (2.15) and I can’t seem to insert raw JS or HTML using the PageBuilder. Every time I insert Raw HTML/JS, and try to save / update a page, it seems to delete it and the raw HTML / raw JS box shows up empty when it gets refreshed. What’s happening here?

    Wordpress Version: 3.8.1
    Dante Version: 2.15

    I’m able to insert raw HTML by using a text block but when I try to include javascript it gives me the following console error:

    Uncaught TypeError: Property ‘$’ of object [object Object] is not a function

    The JavaScript I’m trying to insert:
    <script type=”text/javascript”>
    $(document).ready(function() {
    $(“.signup-type”).change(function() {
    if ( $(“.signup-type”).val() == “Merchant”) {
    $(‘#merchant-fields’).show();
    } else {
    $(‘#merchant-fields’).hide();
    }
    });
    });
    </script>

    #50691
    ptrikutam
    Member
    Post count: 9

    OK, I just realized I was inputting jQuery wrong, since wordpress runs jQuery in noconflict mode.

    Raw JS Still doesn’t work. Here’s what I tried next in a text block (in the text tab):

    <script type="text/javascript">
    jQuery(document).ready(function() {
      jQuery(".signup-type").change(function() {
        if ( jQuery(".signup-type").val() == "Merchant") {
          jQuery('#merchant-fields').show();
        } else {
          jQuery('#merchant-fields').hide();
        }
      });
    });
    </script>

    Instead, that turns into:

    
    <script type="text/javascript">// <![CDATA[
    jQuery(document).ready(function() {
      jQuery(".signup-type").change(function() {
        if ( jQuery(".signup-type").val() == "Merchant") {
          jQuery('#merchant-fields').show();
        } else {
          jQuery('#merchant-fields').hide();
        }
      });
    });
    // ]]></script>
    

    What’s going on w/ the Raw JS?

    #50994
    kirstentCiG
    Member
    Post count: 5

    I am having a similar problem. Our website is at:

    http://cm2media.ca/cig/

    When we use the Raw HTML element, no matter how simple the code, it will get corrupted when the page is updated and will show funny characters instead of the text.

    This does not happen if we use a “Text Block (Full Width)” and set the editor to “HTML” mode.

    You can see the gibberish on a raw html block just under the slider, and a sample “Text Block (Full Width)” at the bottom of the page which works correctly.

    Please advise!

    P.S. Thanks for fixing the problem with the “Tours” shortcode — it’s working fine now.

    #51205
    Tahir – SUPPORT
    Member
    Post count: 1212

    Hi,
    Have assinged this to Ed, I am sure it will be investigated and fixed for the next update.

    Best,
    Tahir

    #51368
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Hey guys,

    Apologies for this – it’s been one of those things we’ve been meaning to get fixed for a while. Just spent the last hour or so working on it and think I’ve pretty much got it 100% now. If you drop me an email via: http://themeforest.net/user/swiftideas then I’ll happily send over a fixed build for you.

    Thanks,

    – Ed

    #51369
    ptrikutam
    Member
    Post count: 9

    OK, I’ll drop you an email separately, Ed.

    As for everyone else: One thing that worked for me was putting in Raw HTML (not JS) into a text block on the raw text side, and then including the JavaScript in the functions.php of a Dante-Child theme. I created a separate JavaScript file for my custom JS and included it there, so hopefully this provides some folks a temporary solution until an official fix is out.

    Thanks,
    pav

    #51371
    kirstentCiG
    Member
    Post count: 5

    Thanks for your prompt reply, Ed. We just sent you a message from your user page. Please send the fixed build to the email address specified on that message. Thanks again for your help with this matter.

    #51393
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Replied to both of you 🙂

    – Ed

Viewing 8 posts - 1 through 8 (of 8 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