Tagged: 

Viewing 18 posts - 1 through 18 (of 18 total)
  • Author
    Posts
  • #496724

    Hello

    On my website I want to add some extra javascript.

    This is the code
    <script>
    jQuery(document).ready(function(e) {
    jQuery(‘.qsot-event-area-ticket-selection’).prepend(jQuery(‘.ticket-form’));
    });
    </script>

    I want the code apply to the page that is in private content area
    … It works on other themes, but not in Enfold.
    I’ve tried it all … Any idea?

    #496924

    Hey jurgen1979,

    Could you please provide us with a temporary admin login so that we can take a closer look? You can post the details in the Private Content section of your reply.

    Best regards,
    Rikard

    #496948

    Hello

    Please find the login details below

    Thank you for the fast reply!

    #497269

    Hi!

    Please add following code to Functions.php file in Appearance > Editor

    function add_custom_js(){
    ?>
    <script>
    jQuery(document).ready(function(e) {
    jQuery(‘.qsot-event-area-ticket-selection’).prepend(jQuery(‘.ticket-form’));
    });
    </script>
    <?php
    }
    add_action('wp_footer', 'add_custom_js');

    Regards,
    Yigit

    #1055273

    I tried to add a code in the code block, but it does not work!
    <script src=”http://www.tgju.org/webservice/global/snippet-loader.php?token=webservice&items=price_dollar_rl,price_eur,price_gbp,price_afn,price_try,price_amd&opts=diff,low,high,time&placeholder=tgju-data”></script><div id=”tgju-data”></div><style>body #tgju table.data-table thead th,body .tgju-copyright{background-color: #c231a7 !important;}body #tgju table.data-table thead th,body .tgju-copyright{color: #ffffff !important;}body #tgju table.data-table{border-color: #1a1a1a !important;}</style>

    • This reply was modified 5 years, 10 months ago by mjavidnikoo.
    #1055827

    Hi mjavidnikoo,

    What are you trying to add and where?

    Best regards,
    Rikard

    #1055840

    i am trying to add a Javascript in the some page with Content Element (Code-Block)
    the code is :
    <script src=”http://www.tgju.org/webservice/global/snippet-loader.php?token=webservice&items=price_dollar_rl,price_eur,price_gbp,price_afn,price_try,price_amd&opts=diff,low,high,time&placeholder=tgju-data”></script><div id=”tgju-data”></div><style>body #tgju table.data-table thead th,body .tgju-copyright{background-color: #c231a7 !important;}body #tgju table.data-table thead th,body .tgju-copyright{color: #ffffff !important;}body #tgju table.data-table{border-color: #1a1a1a !important;}</style>

    #1056100

    Hi,

    Thanks for the clarification, what exactly is not working and what is that script supposed to do? Did you contact the authors of the code?

    Best regards,
    Rikard

    #1056118

    This code shows in a table the price of dollars and euros. No, I did not tell the author the code because it works on other websites

    • This reply was modified 5 years, 10 months ago by mjavidnikoo.
    #1056292

    Hi mjavidnikoo,

    Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?

    Best regards,
    Victoria

    #1056371

    Hi Victoria,
    Here is login detail.
    I have already inserted it on the start page in a code block.

    Best regards,
    Mahdi

    #1056711

    Hi mjavidnikoo,

    Best regards,
    Victoria

    #1056750

    Hi Victoria ,
    Maybe I said bad! Or you have not worked on the code yet?
    I have already inserted the code on the start page in a code block. but does not work!
    i do not see any changes!
    Best wishes,
    Mahdi

    • This reply was modified 5 years, 10 months ago by mjavidnikoo.
    #1057171

    Hi Mahdi,

    I know you did. But on the screenshot in private it is shown that the script is blocked and the link in private now, the one that you use gives a 502 error.

    You need to get the working link.
    Best regards,
    Victoria

    #1057800

    Hi Victoria,
    already is working !
    Best regards,
    Mahdi

    • This reply was modified 5 years, 10 months ago by mjavidnikoo.
    #1057895

    Hi Mahdi,

    Do you mean working on your page?

    I still see a blcoked script in the console….Hm….

    Best regards,
    Victoria

    #1059614

    No . I mean the link work.

    #1060897

    Hi,

    The snippet-loader.php file doesn’t exist or is not found.

    Request URL: https://iranianalman.de/%E2%80%9Dhttp:/www.tgju.org/webservice/global/snippet-loader.php?token=webservice&items=price_dollar_rl,price_eur,price_gbp,price_afn,price_try,price_amd&opts=diff,low,high,time&placeholder=tgju-data%E2%80%9D
    Request Method: GET
    Status Code: 404
    Remote Address: 136.243.162.142:443
    Referrer Policy: no-referrer-when-downgrade

    Please contact the script author for additional help. Or try to load that script using this function.

    // https://developer.wordpress.org/reference/functions/wp_register_script/

    function my_scripts_method() {
        wp_register_script( 'tgju-js', 'http://www.tgju.org/webservice/global/snippet-loader.php?token=webservice&items=price_dollar_rl,price_eur,price_gbp,price_afn,price_try,price_amd&opts=diff,low,high,time&placeholder=tgju-data' , '', '', true );
        wp_enqueue_script( 'tgju-js' );
    }
    add_action( 'wp_enqueue_scripts', 'my_scripts_method' );

    And leave the div container in the code block.

    Best regards,
    Ismael

Viewing 18 posts - 1 through 18 (of 18 total)
  • You must be logged in to reply to this topic.