Notifications
Clear all

[Solved] icheck.js  

  RSS

Sirius
(@sirius)
Member Customer
Joined: 3 months ago
Posts: 23
27/01/2020 1:14 am  

Hi,

is there a way to prevent loading of icheck.js only for all the forum since it cause some problem with checkbox?

thank you!


Tom
 Tom
(@tomson)
Support Team Admin
Joined: 5 years ago
Posts: 3119
27/01/2020 12:16 pm  

Hi @sirius,

It's not possible to stop a JS function from other side. it should be stopped from the JS function side. This is not CSS code to fix by setting !important statement from forum side. There is no way to stop this JS function. You should ask this question to the JS function support or to the support team who use this in own plugin or theme.


Sirius
(@sirius)
Member Customer
Joined: 3 months ago
Posts: 23
27/01/2020 2:45 pm  

@tomson

yes indeed, sorry for asking πŸ˜‰
I still managed by css to replace things correctly.

best regards

Β 


Elvina
(@elvina)
Honorable Member Moderator
Joined: 7 months ago
Posts: 740
27/01/2020 3:59 pm  

@sirius,

You should add the following code in your active theme functions.php file.

add_action('wp_enqueue_scripts', function(){
/** @var string $handle Name of the script to be removed */
$handle = 'YOUR_icheck.js_HANDLE_NAME';
if(is_wpforo_page()) wp_dequeue_script($handle);
}, 999);

The red marked value is the value of the handle name enqueued by wp_enqueue_script(). You just need to find the handle name and put it as a value for $handle variable.
Also, please note that the handle name and handle file name do not match.

You need to find the parametre for enqueued icheck.js file, then use the same parameter for dequeue it.


Sirius
(@sirius)
Member Customer
Joined: 3 months ago
Posts: 23
28/01/2020 2:04 am  

@elvina

Hi!

ok great thank you!

I read about dequeue_script yesterday but i didn't have time to get more indeep to learn about it.

Thank you very much for the info, i will work on that

best regards

Β 


Sirius
(@sirius)
Member Customer
Joined: 3 months ago
Posts: 23
28/01/2020 3:02 am  

@elvina

oh yes! thank you so much

manage to find the handle πŸ˜‰

perfect now, thank a lot!

best regards

Β 


Elvina liked
Share: