1 Reply Latest reply on Dec 18, 2012 12:18 PM by kferg328

    jQuery event runs great on mac, not pc

    kferg328

      I'm using jQuery 1.8.3

       

      Developing an app in dreamweaver.  Runs great on my mac, exactly as expected to run.  However on my co-workers windows computer the event code doesn't execute.  I've searched up and down the web looking for answers and I can't find anything.

       

      jQuery Code:

       

       

       

      // BIND EVENT TO LISTEN WHEN "OPTION" IS ADDED AND SELECT THE APPROPRIATE ONES (DEFAULTS) $(".partOptions").on("DOMNodeInserted", "option", function() {

           $("#defaultCrosses").find("input").each(function() {

                var exOption = $(this).attr("name");

                var mlOption = $(this).attr("title");

                if(mlOption != "") {

                     $(".partOptions").find("." + exOption + " ." + mlOption + " option[label='" + mlOption + "']").attr("selected", "selected").parent().change();

                }

           });

      });

       

      So its listening for when an "option" is added then executing code accordingly.

       

      After a series of "each" loops run I run a function to see if they are all complete, and when they are I unbind the event:

       

       

      var checkPartOptionRows = setInterval(function() {

           if(totalPartOptionRowsLooped == totalPartOptionRows) {

                clearInterval(checkPartOptionRows);

                $(".partOptions").off("DOMNodeInserted", "option");

           }

      }, 200);

       

      All of this works completely as expected on mac.  Doesn't do anything on pc.  About to pull my hair out!

       

      Please help!!!