How can I add styling (let's say bold attribute) to the "Hello world" in this code:
bootbox.alert("Hello world!", function() {
Example.show("Hello world callback");
});
Thank you
Expanding on James King's answer:
using firebug's console you can see that the response to the command:
bootbox.alert('hello world')
is a reference to the bootbox containing div element; Object[div.bootbox]
So it's very easy to totally redefine the alert when you call it by simply changing its css attributes:
bootbox.alert('Danger!!' ).find('.modal-content').css({'background-color': '#f99', 'font-weight' : 'bold', color: '#F00', 'font-size': '2em', 'font-weight' : 'bold'} );
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With