1

I'm using a jQuery plugin for modals to work on my website, the plugin/code has the option to change the background color of the modal, if you go at the bottom of the plugin's website you'll see the options.

I'm sure this is probably something very simple, I'm just not sure how to implement it in the plugin's initialization code which looks like this:

<script>
  $("#demo01").animatedModal();
</script>

Any help would be highly appreciated.

Thanks!

3 Answers 3

3

I don't know that library, but usually you pass in an object to the function. So,

$("#demo01").animatedModel( {optionName: optionValue} );

You could always define the object before-hand as well.

var options = { optionName: optionValue };

$("#demo01").animatedModel(options);
Sign up to request clarification or add additional context in comments.

Comments

0

Options are basically passed in the function as a object. I hope it will work.

$("#demo01").animatedModal({
    animatedIn:'zoomIn',
    animatedOut:'bounceOut',
    color:'#39BEB9',
    beforeOpen: function() {

        // do something before open
    },
    afterClose: function() {
      //do something after close

    }
});

Comments

0
 $("#demo01").animatedModal({ 
    color: 'color' 
});

And if you want to add more options:

 $("#demo01").animatedModal({ 
    option: value,
    option: value,
    option: value
});

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.