HubSpot / vex

A modern dialog library which is highly configurable and easy to style. #hubspot-open-source
http://github.hubspot.com/vex/docs/welcome
MIT License
6.92k stars 494 forks source link

vex dialog not working #208

Closed paparupps closed 7 years ago

paparupps commented 7 years ago

I am using Vex successfully on several pages of the web app I am developing. However, in this particular screen, the vex dialog is not working as expected. The picture shows how all the vex dialogs are appearing on my screen. Then, no matter which of the buttons are clicked, 'value' is set to false. I'm thinking theres' something in my code (which is rather extensive) that is interfering with Vex, but I haven't been able to figure it out. Has anyone else ever run into this ?

HTML code

JAVASCRIPT coding in Cancel button.

        vex.dialog.open({
            message: 'Discard changes ?',
            showCloseButton: false,
            buttons: [
                $.extend({}, vex.dialog.buttons.YES, { text: 'Yes' }),
                $.extend({}, vex.dialog.buttons.NO, { text: 'No' })
            ],
            callback: function (value) {
                if (value){
                                           // Do stuff
                }
            }
        });

image

bbatliner commented 7 years ago

It looks like the vex dialog on this page doesn't have a theme. Make sure to include the CSS at the top of the page!

paparupps commented 7 years ago

Sorry - I should have included all of the contents of the head.