Forum Replies Created

Viewing 5 replies - 16 through 20 (of 20 total)
  • Thread Starter dhumeurvegetale

    (@dhumeurvegetale)

    ALLELUIA , ALLELUIA Jose !!!!!!

    It works now , I had to replace all the $ in my function to work without adding the googleapi JQuery script, i changed only the first $ in my first try, it’s why it didn’t worked….

    Now my function is:

    jQuery(document).ready(function(){
        jQuery('#fld_4720906_1_opt1999183').on('click',function(){
            if(this.checked){
                jQuery('.fld_6260799_1').each(function(){
                    this.checked = true;
                });
            }else{
                 jQuery('.fld_6260799_1').each(function(){
                    this.checked = false;
                });
            }
        });
        
        jQuery('.fld_6260799_1').on('click',function(){
            if(jQuery('.fld_6260799_1:checked').length == jQuery('.fld_6260799_1').length){
                jQuery('#fld_4720906_1_opt1999183').prop('checked',true);
            }else{
                jQuery('#fld_4720906_1_opt1999183').prop('checked',false);
            }
        });
    });

    PHEW, PHEW, PHEW, it took me days and hours to find the solution and i will still searching without your help, thank you very much my friend……

    It’s a ROOKIE mistake ………

    Thread Starter dhumeurvegetale

    (@dhumeurvegetale)

    Me again…

    I found a script to verify if JQuery library is loaded on my page , and it said JQuery is loaded (Yeah !)….So i deleted the google api JQuery script to see if my Select All function works, no way !!!!!!

    window.onload = function() {
        if (window.jQuery) {  
            // jQuery is loaded  
            alert("Yeah!");
        } else {
            // jQuery is not loaded
            alert("Doesn't Work");
        }
    }
    Thread Starter dhumeurvegetale

    (@dhumeurvegetale)

    Hi Jose. I just read the tuto on kinsta about enqueuing, but it’s a page in my theme (SKROLLEX) not a plugin ,very interesting anyway, thanks.

    For the JQuery instead of $, i’ve switch it, if it’s the way to write it in WP i will do it every time same if for me it doesn’t work without the googleapi script .

    But with the googleapi JQuery script only the $ work….

    I’ve got an asset pluging but unloaded on this page.

    This week i will check in my theme files how is it working, maybe i can’t find something about.

    Thread Starter dhumeurvegetale

    (@dhumeurvegetale)

    Sorry Jose, I’m a beginner, what do you mean by enqueuing ?

    Thread Starter dhumeurvegetale

    (@dhumeurvegetale)

    Hi Jose. the script in the HEAD is loaded by WP and the one from googleapi is added manually. I don’t think it’s a version problem, because before that i try a script to check if JQuery is loaded and it is….

    In my form i freeze the submit and reset button till a checkbox is checked and it work only after i add manually the JQuery googleapi script tag.

    does it have something to do with the ID JQuery script tag ?

    thanks to answer me, anyway

Viewing 5 replies - 16 through 20 (of 20 total)