Timeline for Wordpress Jquery+scripts enqueue issue
Current License: CC BY-SA 3.0
18 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 6, 2023 at 9:21 | vote | accept | Marco Boncompagno | ||
Jan 2, 2022 at 3:03 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
Apr 13, 2020 at 23:02 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
Dec 14, 2019 at 10:02 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
Aug 3, 2019 at 23:01 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
Mar 16, 2019 at 18:02 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
Jun 8, 2016 at 11:21 | history | edited | Marco Boncompagno | CC BY-SA 3.0 |
added 352 characters in body
|
Jun 7, 2016 at 13:19 | comment | added | Marco Boncompagno | Useful! I did it and echoes "sone anyslider" I guess the problem is elsewhere. I'm trying to understand if the issue might be the script not being below the slider | |
Jun 7, 2016 at 13:15 | comment | added | cjbj |
You can use if (wp_script_is('anyslider')) echo "done anyslider"; after wp_enqueue_script to make sure the enqueueing succeeded.
|
|
Jun 7, 2016 at 13:00 | comment | added | Marco Boncompagno | Right now, inspecting the page with firebug shows me that the scripts I need are called in the header. the scripts I tried are working on the demo I downloaded and I'm trying to adapt them to the wordpress site. I'm working on with no results. If i put the code in a static website markup (with the latest version of jquery and the scripts) It's working so i suspect it's not a matter of script versions. this is the function I'm using to call the script jsfiddle.net/bonko/7fh215e9 @cjbj: I read the codex: I'm not really sure about how I should use the wp_script_is. I'll inquire further | |
Jun 7, 2016 at 13:00 | comment | added | Marco Boncompagno | i found the my_jquery_enqueue here: css-tricks.com/snippets/wordpress/…. (anyways I removed it it) I also corrected the jquery version: now it's 2.2.4. Script still not running. I found and corrected the missing brackets but nothing. | |
Jun 7, 2016 at 12:37 | comment | added | majick |
you really do not need the my_jquery_enqueue function at all, where did that come from..? you should let wordpress enqueue jquery unless you have a very very specific reason and even then it's not the best idea...
|
|
Jun 7, 2016 at 12:33 | comment | added | cjbj |
Depending on how you call it alert() wil also work in plain javascript without jquery. I'd double check that. Are you sure the enqueued scripts work with the jquery version you load? You could also try wp_script_is
|
|
Jun 7, 2016 at 12:25 | comment | added | Marco Boncompagno | Yes, sorry: I tried to troubleshoot it. I added an alert window script wich is working (so I'm quite sure at least a basic version of jquery is running). when i set up the html an css markup on my page and try to call it with its function the slider doesn't work at all (I'm using the following slider as a template jwilsson.github.io/AnySlider The thing I'm not sure of is if the other two scripts are loading or not. | |
Jun 7, 2016 at 11:47 | comment | added | cjbj | There are some closing brackets missing and you're loading an old jquery version, but otherwise your code looks fine. Could you describe what exactly is the problem you are experiencing? | |
Jun 7, 2016 at 11:27 | answer | added | Damien Carbery | timeline score: 0 | |
Jun 7, 2016 at 11:11 | review | First posts | |||
Jun 7, 2016 at 11:46 | |||||
Jun 7, 2016 at 11:07 | history | asked | Marco Boncompagno | CC BY-SA 3.0 |