Tagged: x
-
AuthorPosts
-
April 18, 2016 at 3:14 am #887746
milanzivanovicParticipantHi guys!
I can’t login to Admin page. Please, help!
April 18, 2016 at 3:17 am #887754
milanzivanovicParticipantThis reply has been marked as private.April 18, 2016 at 4:13 am #887839
milanzivanovicParticipantNow I tried to remove this line from child themes’s function.php:
add_action(‘init’, ‘modify_jquery’);
and it works with no problems. But, than I can’t use custom JQuery code. How to call JQuery properly?
April 18, 2016 at 4:57 am #887913
ChristopherModeratorHi there,
Please provide with original code you want to add.
Thanks.
April 18, 2016 at 5:21 pm #889004
milanzivanovicParticipantThe JS code is already in themes/x-child/framework/js/custom.js file.
Here is:
$(document).ready(function(){ $(".otvori_plejer").click(function(){ var w = 300; var h = 450; var left = Number((screen.width/2)-(w/2)); var tops = Number((screen.height/2)-(h/2)); window.open("/plejer", '', 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, width='+w+', height='+h+', top='+tops+', left='+left); }); });This doesn’t work if I remove the line in function.php:
add_action(‘init’, ‘modify_jquery’);April 19, 2016 at 4:42 am #889636
Paul RModeratorHi,
Please remove the code in your child theme’s functions.php that reads
//Making jQuery Google API function modify_jquery() { if (!is_admin()) { // comment out the next two lines to load the local copy of jQuery wp_deregister_script('jquery'); wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js', false, '1.11.3'); wp_enqueue_script('jquery'); } } add_action('init', 'modify_jquery');Then replace your code in your custom.js with this.
jQuery(document).ready(function($){ $(".otvori_plejer").click(function(){ var w = 300; var h = 450; var left = Number((screen.width/2)-(w/2)); var tops = Number((screen.height/2)-(h/2)); window.open("/plejer", '', 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, width='+w+', height='+h+', top='+tops+', left='+left); }); });Hope that helps.
April 20, 2016 at 10:55 am #892056
milanzivanovicParticipantThank you! This js code now works on all pages. But, I can’t run the other js code for the single page “Top 10”. Can you help me with this?
Page is: http://www.radiomorava.rs/top-10-lista/
JS code is in file: public_html/wp/wp-content/themes/x-child/framework/js/custom-top10.jsPlease, help me to fix this and I won’t bother you anymore. 🙂
April 20, 2016 at 11:40 pm #892996
Paul RModeratorHi,
Please replace the code in custom-top10.js that reads
$(document).ready(function(){with this
jQuery(document).ready(function($){It’s in (~ line no. 122)
Hope that helps.
April 21, 2016 at 7:14 am #893520
milanzivanovicParticipantYeah! Everything works fine now. 😉
The greatest theme with the best support ever! There is a little serbian phrase: “If you didn’t exist, somebody would have to invent you!” I hope I’ve translated it correctly.
Thank you!
April 21, 2016 at 2:04 pm #894174
JadeModeratorYou’re welcome and thanks for the kind words. 🙂
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-887746 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
