Skip to content

How to use .setValue() ? #1965

Answered by inspector71
inspector71 asked this question in Q&A
Discussion options

You must be logged in to vote

UPDATE: I figured this one out.

It does seem that, as suspected, I needed to 'trap' (AKA assign) each instance I was creating with the jQuery selection returning many select elements as selectize instances. This involved the following:

      jQuery('.booleanWithDependancies select').each( function ( idx , el ) {

        window[ '$selectize' + el.name ] = jQuery( el ).selectize({

          plugins : ["clear_button"]

         });

      })

Apparently window['$selectize' + el.name ] is the same as creating a dynamic, unique variable on the fly using eval(). Having memory burn of whispers that eval() is a performance hit, I went with window[] instead.

Later ...

       jQuery.ajax({

     …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by inspector71
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant