Tagged: javascript
-
AuthorPosts
-
September 1, 2015 at 9:39 pm #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?September 2, 2015 at 9:37 am #496924Hey 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,
RikardSeptember 2, 2015 at 10:01 am #496948Hello
Please find the login details below
Thank you for the fast reply!
September 2, 2015 at 5:02 pm #497269Hi!
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,
YigitJanuary 18, 2019 at 12:27 am #1055273I 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.
January 19, 2019 at 10:50 am #1055827January 19, 2019 at 12:09 pm #1055840i 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>January 20, 2019 at 10:40 am #1056100Hi,
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,
RikardJanuary 20, 2019 at 11:09 am #1056118This 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.
January 20, 2019 at 8:33 pm #1056292Hi 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,
VictoriaJanuary 21, 2019 at 12:59 am #1056371Hi Victoria,
Here is login detail.
I have already inserted it on the start page in a code block.Best regards,
MahdiJanuary 21, 2019 at 3:09 pm #1056711Hi mjavidnikoo,
Best regards,
VictoriaJanuary 21, 2019 at 4:19 pm #1056750Hi 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.
January 22, 2019 at 1:02 pm #1057171Hi 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,
VictoriaJanuary 23, 2019 at 4:43 pm #1057800Hi Victoria,
already is working !
Best regards,
Mahdi- This reply was modified 5 years, 10 months ago by mjavidnikoo.
January 23, 2019 at 7:07 pm #1057895Hi Mahdi,
Do you mean working on your page?
I still see a blcoked script in the console….Hm….
Best regards,
VictoriaJanuary 28, 2019 at 1:33 pm #1059614No . I mean the link work.
January 31, 2019 at 11:37 am #1060897Hi,
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-downgradePlease 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 -
AuthorPosts
- You must be logged in to reply to this topic.