Method 1 : Form hook_page_attachments
In this example, we will use a field to get tags list, the number of tags dynamic.
Note : On drupal the best practice is use drupal behaviors but not JS or Jquery codes such as:
Note : It's not possible to read the current headers. You could make another request to the same URL and read its headers, but there is no guarantee that the headers are exactly equal to the current.
Note : Following examples are tested on FireFox Version 52.
Open Web browser console. F12
Method 1 . Press F12 and click on "Console"
Method 2 . Press Ctrl + Shift + K
For example in the top window (Parent): (
What is drupal behaviors ?
Drupal behaviors allow to execute javascpts in particular context and / or pass data from drupal to client side java script.
Example : Execute JS only in the front page.
This Script run whin the
body tag contains
Modal dialogue box ( bootstrap / jquery)
1. Remobe the gray background of modal dialog box (modal-backdrop)
Like a CSS, You can add a JS as a librarie