Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

bootstrap 4 modal get event related target

$('#exampleModal').on('show.bs.modal', function (event) {
  var button = $(event.relatedTarget) // Button that triggered the modal
  var recipient = button.data('whatever') // Extract info from data-* attributes
  // If necessary, you could initiate an AJAX request here (and then do the updating in a callback).
  // Update the modal's content. We'll use jQuery here, but you could use a data binding library or other methods instead.
  var modal = $(this)
  modal.find('.modal-title').text('New message to ' + recipient)
  modal.find('.modal-body input').val(recipient)
})
Comment

PREVIOUS NEXT
Code Example
Java :: what is use of static block in java 
Java :: reverse array java 
Java :: split string into int array 
Java :: java arithmetic operators 
Java :: jpa default value enum 
Java :: view binding in recyclerview adapter android java 
Java :: set password visible in android 
Java :: java bukkit double jump 
Java :: uppercase string java 
Java :: Java, how to compare Strings with String Arrays 
Java :: java random number between 2 values inclusive 
Java :: matrix multiplication in java 
Java :: prepared statement update 
Java :: instantiate optinal java 8 
Java :: play mp3 android java 
Java :: string reverse in java 
Java :: double to string java 
Java :: java loop over string 
Java :: printing 2d array in java 
Java :: get the max value from arrayList java and save it in int 
Java :: spring boot default value false 
Java :: string tokenizer java 
Java :: hello world java code 
Java :: main method 
Java :: check how many times a character appears in a string java 
Java :: open website from android activity 
Java :: android kill other app programmatically by package 
Java :: java gitignore 
Java :: java iterator to stream 
Java :: cmd java compile 
ADD CONTENT
Topic
Content
Source link
Name
9+5 =