0

i have this block of prototype code

Product.ConfigurableSwatches = Class.create();
Product.ConfigurableSwatches.prototype = {
    productConfig: false,
    configurableAttributes: {},
    initialize: function(productConfig, config) {....},
    setConfig: function(x){}, ..
}

This block of code isn't running/working for the out of DOM(Document object model) elements i.e for the elements that is added later on the DOM. ?

So, my question how to make it work with javascript/jquery call ? Because from jquery i can make it work for out of DOM element.

1 Answer 1

1

If you are trying to call a specific function of this class it can be done as follows:

<script type="text/javascript">
Product.ConfigurableSwatches.initialize(arguments); 
</script>

Hope this helps!!

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.