WPIntell

Source evidence

Conflict with another JS script

WP CountUP JS · support · 2017-04-01T15:41:00+00:00

mixedsentiment
mediumseverity
0.85relevance
11replies
Evidence onlycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

1 / 1 rows with source links

100.0% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

0 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
daytrader007 resolved
Nothing wrong with your plugin, I love it. However it conflicts with another script that plays videos on mouse over. When your plugin is active, videos don’t start playing on mouse over. Would you be able tell what is causing this conflict? And how to make both scripts work? Here is our script. window.onload = function() { const vids = document.getElementsByTagName("video") for (let i = 0; i < vids.length; i++) { vids[i].addEventListener( "mouseover", function(e) { vids[i].play() }) vids[i].addEventListener( "mouseout", function(e) { vids[i].pause() }) } } Hi, please, tell me the plugin’s name so I can download and test it at my local environment. Thanks! The plugin used is yours “WP CountUP JS” We have this line in head section <script src="http://www.domain.com/video-play-on-mouse-over.js"></script> JS file contains just this code. Used to play video on mouse over it. window.onload = function() { const vids = document.getElementsByTagName("video") for (let i = 0; i < vids.length; i++) { vids[i].addEventListener( "mouseover", function(e) { vids[i].play() }) vids[i].addEventListener( "mouseout", function(e) { vids[i].pause() }) } } Then in HTML content we have <video loop preload="auto"><source src="http://www.domain.com/video-file.mp4" type="video/mp4" /></video> So technically videos and everything else worked perfectly fine until we installed and activated your plugin “WP CountUP JS” . The numbers animate and count up as per your plugin fine, but videos no longer play on mouse over. We have deactivated your plugin temporary so we can have users play those video files. Until we can resolve the conflict of your plugin and our script. Thank you for helping I see, thanks for that code, I’ll test it and resolve it. Please, download the last version (3.1) and test it, should work now. Let me know. 🙂 Installed new update. Now videos and everything works great, except for when using this functionality with another shortcode [users_count] Now it just shows — Previous version of your plugin did work excellent when using it like bellow. This just gets actual number of users from the database [countup start="1" decimals="0" duration="5"][users_count][/countup] Please note, this works fine [countup start="1" decimals="0" duration="5"]5555[/countup] Hmmm, weird. How can I get that shortcode or how you do that to get the value? Have you checked this option Use the end number inside the shortcode? , right? Maybe if I can get any access to your site to test and see what’s going on, I could solve it. If you agree, send me an email with the access: roelmagdaleno@gmail.com Thanks. Hey! Ignore my previous response. Just update the plugin to the last version (3.2) and should work. Let me know if it worked. 🙂 We use this PHP code in the functions file to get users count // Function to return user count function wpb_user_count() { $usercount = count_users(); $result = $usercount['total_users']; return $result; } // Creating a shortcode to display user count add_shortcode('user_count', 'wpb_user_count'); We have these codes side by side [countup start="1" decimals="0" duration="5"][user_count][/countup] [countup start="1" decimals="0" duration="5"]5555[/countup] Result Please note that both codes worked fine in previous version of your plugin, I am worried if there are other people using shortcodes to show dynamic data just like in the sample above. Trying 3.2 Now everything works perfect! Thank you so much Roel! Thanks to you to find out these issues. Glad to help! 🙂 This reply was modified 9 years, 1 month ago by Roel Magdaleno .

Comments

11 shown
Roel Magdaleno 2017-04-01T22:10:00+00:00

Hi, please, tell me the plugin’s name so I can download and test it at my local environment. Thanks!

daytrader007 2017-04-01T23:06:00+00:00

The plugin used is yours “WP CountUP JS” We have this line in head section <script src="http://www.domain.com/video-play-on-mouse-over.js"></script> JS file contains just this code. Used to play video on mouse over it. window.onload = function() { const vids = document.getElementsByTagName("video") for (let i = 0; i < vids.length; i++) { vids[i].addEventListener( "mouseover", function(e) { vids[i].play() }) vids[i].addEventListener( "mouseout", function(e) { vids[i].pause() }) } } Then in HTML content we have <video loop preload="auto"><source src="http://www.domain.com/video-file.mp4" type="video/mp4" /></video> So technically videos and everything else worked perfectly fine until we installed and activated your plugin “WP CountUP JS” . The numbers animate and count up as per your plugin fine, but videos no longer play on mouse over. We have deactivated your plugin temporary so we can have users play those video files. Until we can resolve the conflict of your plugin and our script. Thank you for helping

Roel Magdaleno 2017-04-01T23:09:00+00:00

I see, thanks for that code, I’ll test it and resolve it.

Roel Magdaleno 2017-04-02T00:25:00+00:00

Please, download the last version (3.1) and test it, should work now. Let me know. 🙂

daytrader007 2017-04-02T00:44:00+00:00

Installed new update. Now videos and everything works great, except for when using this functionality with another shortcode [users_count] Now it just shows — Previous version of your plugin did work excellent when using it like bellow. This just gets actual number of users from the database [countup start="1" decimals="0" duration="5"][users_count][/countup] Please note, this works fine [countup start="1" decimals="0" duration="5"]5555[/countup]

Roel Magdaleno 2017-04-02T06:07:00+00:00

Hmmm, weird. How can I get that shortcode or how you do that to get the value? Have you checked this option Use the end number inside the shortcode? , right? Maybe if I can get any access to your site to test and see what’s going on, I could solve it. If you agree, send me an email with the access: roelmagdaleno@gmail.com Thanks.

Roel Magdaleno 2017-04-02T06:24:00+00:00

Hey! Ignore my previous response. Just update the plugin to the last version (3.2) and should work. Let me know if it worked. 🙂

daytrader007 2017-04-02T06:29:00+00:00

We use this PHP code in the functions file to get users count // Function to return user count function wpb_user_count() { $usercount = count_users(); $result = $usercount['total_users']; return $result; } // Creating a shortcode to display user count add_shortcode('user_count', 'wpb_user_count'); We have these codes side by side [countup start="1" decimals="0" duration="5"][user_count][/countup] [countup start="1" decimals="0" duration="5"]5555[/countup] Result Please note that both codes worked fine in previous version of your plugin, I am worried if there are other people using shortcodes to show dynamic data just like in the sample above.

daytrader007 2017-04-02T06:31:00+00:00

Trying 3.2

daytrader007 2017-04-02T06:37:00+00:00

Now everything works perfect! Thank you so much Roel!

Roel Magdaleno 2017-04-02T06:40:00+00:00

Thanks to you to find out these issues. Glad to help! 🙂 This reply was modified 9 years, 1 month ago by Roel Magdaleno .