-
Notifications
You must be signed in to change notification settings - Fork 0
displayNewElementIn
cl4cnam edited this page Nov 17, 2023
·
2 revisions
displayNewElementIn(message, enclosingElement, typeOfNewElement, doesItScrollIntoView)-
message: string
What you want to be displayed -
enclosingElement: string or HTMLElement
- If string, a CSS selector whose first result is the HTMLElement in which you want to add a message
- Otherwise, an HTMLElement in which you want to add a message
-
typeOfNewElement: string
The type of HTML element that you want to create (ex: 'p', 'div', 'span',...) -
doesItScrollIntoView: boolean
If you want the newly created element to scroll into visible zone of screen (trueorfalse)
- The newly created
typeOfNewElementHTML element
- Create a new
<typeOfNewElement>message</typeOfNewElement>HTML element inside theenclosingElementelement (at the end).- This new element has two CSS classes:
displayandother - If
lib.cssis loaded, you get this default style:border-color: #00c000; background-color: #c0ffc0; margin-left: 10px; margin-right: auto; border-style: solid; border-width: 1px; border-radius: 10px; padding: 15px; width: 45%;
- This new element has two CSS classes:
FuncSug Documentation