Last active
December 20, 2017 09:58
-
-
Save pardamike/20c0fe073bbad2d8306112d78afc111c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<button type="button" id="clickMe1">Click me 1</button> | |
<button type="button" id="clickMe2">Click me 2</button> | |
<script> | |
(function () { | |
// No customization | |
var fbModal = $.fn.bootstrapFeedback({ | |
getOptionsUrl: 'https://some.api/getOptions', | |
sendFeedbackUrl: 'https://some.api/postData', | |
targetElementId: 'clickMe1' | |
}); | |
fbModal.init(); | |
// Full customization: | |
var feedback = $.fn.bootstrapFeedback({ | |
targetElementId: 'clickMe2', | |
getOptionsUrl: 'https://some.api/getOptions', | |
sendFeedbackUrl: 'https://some.api/postData', | |
styles: { | |
submitBtnClasses: 'btn btn-success', | |
closeBtnClasses: 'btn btn-danger' | |
}, | |
modal: { | |
selectorId: 'anotherFeedbackModal', | |
title: 'Other Title', | |
subtitle: 'New Subtitle', | |
commentTxBxId: 'someTextbox', | |
radioGroupName: 'custom_radio_name', | |
radioGroupContainer: 'radioWrapper', | |
saveBtnId: 'saveMe', | |
notificationAreaId: 'notifyMe' | |
} | |
}); | |
feedback.init(); | |
})(); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment