“JS benachrichtigen” Code-Antworten

JS benachrichtigen

$.notify("Hello World");
Gorgeous Gaur

JS benachrichtigen

var h5 = $("<h5/>").append("You MUST have some Foo !")

$.notify({
  title: h5
}, { 
  style: 'foo',
  autoHide: false,
  clickToHide: false
});
King Pinaster

JS benachrichtigen

var h5 = $("<h5/>").append("You MUST have some Foo !")

$.notify({
  title: h5,
  button: 'Ok'
}, { 
  style: 'foo',
  autoHide: false,
  clickToHide: false
});
King Pinaster

JS benachrichtigen

$.notify("BOOM!", "error");
Mountain Goat

JS benachrichtigen

//add a new style 'foo'
$.notify.addStyle('foo', {
  html: 
    "<div>" +
      "<div class='clearfix'>" +
        "<div class='title' data-notify-html='title'/>" +
        "<div class='buttons'>" +
          "<button class='no'>Cancel</button>" +
          "<button class='yes' data-notify-text='button'></button>" +
        "</div>" +
      "</div>" +
    "</div>"
});

//listen for click events from this style
$(document).on('click', '.notifyjs-foo-base .no', function() {
  //programmatically trigger propogating hide event
  $(this).trigger('notify-hide');
});
$(document).on('click', '.notifyjs-foo-base .yes', function() {
  //show button text
  alert($(this).text() + " clicked!");
  //hide notification
  $(this).trigger('notify-hide');
});
Depressed Dog

JS benachrichtigen

var h5 = $("<h5/>").append("You MUST have some Foo !")

$.notify({
  title: h5,
  button: 'Ok !'
}, { 
  style: 'foo',
  autoHide: false,
  clickToHide: false
});
King Pinaster

Ähnliche Antworten wie “JS benachrichtigen”

Fragen ähnlich wie “JS benachrichtigen”

Weitere verwandte Antworten zu “JS benachrichtigen” auf JavaScript

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen