New Landing How can we help? Themeforest Theme Support Dante Parallax element and custom code

Viewing 9 posts - 1 through 9 (of 9 total)
  • Posted in: Dante
  • #141560
    toni100
    Member
    Post count: 148

    hi
    i have a parallax element which works fine – below the text i now need to place
    this code
    <script>
    (function() {
    var randomId = Math.floor(Math.random() * 100000);
    var targetElemId = ‘bcom_rwidget_’ + randomId;
    document.write(‘<div id=”‘ + targetElemId + ‘”></div>’);
    var script = document.createElement(‘script’);
    script.type = ‘text/javascript’;
    script.async = true;
    script.src = ‘http://www.booking.com/review_widget/at/hoteloberhofertelfes.de.html?tmpl=review_widget/review_widget&wid=&#8217; + targetElemId + ‘&wtype=box_small&hotel_id=70267&widget_language=de’;
    var node = document.getElementsByTagName(‘script’)[0];
    node.parentNode.insertBefore(script, node);
    }());
    </script>

    but as soon as i copy the code in the text box i can not save the parallax element and wordpress automatically changes the code…

    any ideas or workarounds for this problem?

    thank you!

    #141628
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Hi

    Add a Row asset for your parallax background, then add a text box inside for your text, then below that add a Raw JS asset and paste the above code

    – Kyle

    #141641
    toni100
    Member
    Post count: 148

    hi kyle,

    thank you for your response – i have tried it, but its still not showing up on the website. here is the code:

    [spb_column width=”1/2″ el_position=”first”] [spb_text_block pb_margin_bottom=”no” pb_border_bottom=”no” width=”1/1″ el_position=”first last”]
    <h1 style=”text-align: left;”><span style=”background-color: #000000;”>Willkommen im Hotel Oberhofer.
    Das kleine Hotel mit der großen Küche
    Zentral im Stubaital gelegen.</span></h1>
    <div style=”text-align: left;”>[sf_button colour=”black” type=”standard” size=”standard” link=”http://www.tiscover.com/at/xlayout/accs/53123at,de,SCH1/objectId,ACC291268at,curr,EUR,on,ACC9168at/avail.html?ffs=3&#8243; target=”_blank” icon=”” dropshadow=”no” extraclass=””]Preise & Buchen[/sf_button][sf_modal header=”Anfrage senden” btn_colour=”black” btn_type=”standard” btn_size=”standard” btn_text=”Anfragen”][contact-form-7 id="49" title="anfrage-deutsch"][/sf_modal][sf_button colour=”pink” type=”standard” size=”standard” link=”http://www.tiscover.com/at/xlayout/portal/accommodation/53123at,de,SCH1/objectId,ACC291268at,folder,HDP_CACHE,season,at1,selectedEntry,hdplist/hdplist.html?ffs=3&#8243; target=”_blank” icon=”” dropshadow=”no” extraclass=””]Packages[/sf_button]</div>
    [/spb_text_block]
    [spb_raw_js width=”1/1″ el_position=”first last”]
    <script>
    (function() {
    var randomId = Math.floor(Math.random() * 100000);
    var targetElemId = ‘bcom_rwidget_’ + randomId;
    document.write(‘<div id=”‘ + targetElemId + ‘”></div>’);
    var script = document.createElement(‘script’);
    script.type = ‘text/javascript’;
    script.async = true;
    script.src = ‘http://www.booking.com/review_widget/at/hoteloberhofertelfes.de.html?tmpl=review_widget/review_widget&wid=&#8217; + targetElemId + ‘&wtype=box_small&hotel_id=70267&widget_language=de’;
    var node = document.getElementsByTagName(‘script’)[0];
    node.parentNode.insertBefore(script, node);
    }());
    </script>
    [/spb_raw_js]
    [/spb_column] [spb_column width=”1/2″ el_position=”last”]

    <iframe src=”//www.youtube.com/embed/KDo9UdPzOvY?rel=0″ width=”400″ height=”225″ frameborder=”0″ allowfullscreen=”allowfullscreen”></iframe>[/spb_column]

    [/spb_parallax]

    #141644
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Please provide me with a link and login so I can try for you

    – Kyle

    #141668
    toni100
    Member
    Post count: 148
    This reply has been marked as private.
    #141982
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    You need to recreate your page, it’s a mess, not sure how you’ve managed it. You need to change out all Parallax assets for Row assets, like I said in my previous comment. So that you can add a Raw JS asset inside your Row.

    Parallax assets only support text inside, where as with Rows you can drag any page builder asset inside it

    – Kyle

    #142043
    toni100
    Member
    Post count: 148

    ok… the way i understand it now is that within parallax elements you can only have text?

    #142046
    toni100
    Member
    Post count: 148

    [spb_row parallax_video_height=”video-height” parallax_video_overlay=”none” parallax_image_height=”content-height” parallax_image_movement=”fixed” parallax_image_speed=”0.5″ row_overlay_opacity=”0″ width=”1/1″ el_position=”first last”] [spb_parallax parallax_type=”image” bg_image=”240″ bg_type=”cover” parallax_video_height=”video-height” parallax_video_overlay=”none” parallax_image_height=”window-height” parallax_image_movement=”fixed” parallax_image_speed=”0.5″ alt_background=”none” width=”1/1″ el_position=”first last”]

    This is a parallax text block. Click the edit button to change this text.
    [spb_raw_js width=”1/1″ el_position=”first last”]<script>
    (function() {
    var randomId = Math.floor(Math.random() * 100000);
    var targetElemId = ‘bcom_rwidget_’ + randomId;
    document.write(‘<div id=”‘ + targetElemId + ‘”></div>’);
    var script = document.createElement(‘script’);
    script.type = ‘text/javascript’;
    script.async = true;
    script.src = ‘http://www.booking.com/review_widget/at/habicht.de.html?tmpl=review_widget/review_widget&wid=&#8217; + targetElemId + ‘&wtype=box_big&hotel_id=259923&widget_language=de’;
    var node = document.getElementsByTagName(‘script’)[0];
    node.parentNode.insertBefore(script, node);
    }());
    </script>[/spb_raw_js]

    [/spb_parallax] [/spb_row]

    i have tried this one and it is not working… the script code is only working in a raw html or raw js element which is not in the parallax element…

    #142056
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    When you click the ‘Layout’ button you will see ‘Row’. You need to use that

    – Kyle

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