Skip to content

Author: admin@master

JavaScript function is only open one offcanva menu

I built two offcanvas sidebars, one of the is on the right side and includes the normal menu off the webapp, the second one should be a notification sidebar, the problem is that, the left one is working perfect. When I click on the hamburger icon, it will opens the left sidebar, but when I click on the other …

vue.js is not updating the DOM after updating the array

I read a list of items via AJAX and push it into a data Array: In the Vue devTools in Chrome I can see the updated data array, but the DOM list is still empty. The template: The activeSparepart Object is initialised here: Vue devTools shows the following: Answer I think the problem is that your activeSparepar…

How to render HTML string as real HTML?

Here’s what I tried and how it goes wrong. This works: This doesn’t: The description property is just a normal string of HTML content. However it’s rendered as a string, not as HTML for some reason. Any suggestions? Answer Check if the text you’re trying to append to the node is not es…

Outcome of [1][1] and [1][0] in JavaScript

I have a question regarding the outcome of this in JavaScript as I don’t really understand it. Why if I use this code it gets the next result: How to explain the exact way of how JavaScript interprets these results? Answer Pretty simple actually, lets break it down: Broken down is: Same with b – b…

Chat box, auto scroll to bottom

How to auto scroll chat box HTML: Javascript: CSS : Following code functions shows, what user input and when click on send, user will see, his sended messaged in two way.. one in sended & received form. Is there a way to auto-scroll to bottom Answer Add this to your code: So the submit click function look…