I’m using Ajax to get comments. Comment text is treated as max-height:90px by default. When importing comments, I want to attach a link if the text length is longer than the parent element. The code below doesn’t work well. It works imperfectly. All comments have a link or only the first one. Is t…
Why is the site navigation collapsing so fast?
When you look at the menu of this website: https://www.eurotuin.be/ And when you try to hover it, it collapses really fast. see the menu here I’ve tried experimenting with the following code, but it doesn’t seem to work: This one has same effect: Answer Two things : How transition would have any e…
Regexpr with a string
I have to get the result from this regular expression; the regular expression is a string in a variable: but the xlslHrefRegExpResult variable is null. If I use: without the string variable containing the expression, the result is achieved. Where is the error using a string to build the regexp? Answer The cor…
How to find out if the user has enter any value in the input field in react
How to find out if the user has enter any value in the input field in react. What I am trying to achieve is I would like to show a border around the card when the user enters the text/integer into one of the input fields inside that cards and does not click on the save button. So border should
how to find certain key by its value into mixed objects array?
I need to find keys by all coincidence into its value/values example: find key by id=205, output: ‘first’, ‘second’ find key by id=208, output: ‘first’ Answer You can do something like this
How to parse html div text to json
I try to parse data from html to json structure, but I get empty strings. I do it first time. Here example of repeatable div block: But I get this: How I can get json text from classes .itemVuzTitle and .tooltipq to json structure with fields name like title and scores? Please, help with this question. It hel…
How to use Highcharts React to create chart with multiple lines for same XAxis?
I have a dataset containing a date value, and 3 other values. For example: I’d like to create a chart using react highcharts with the dates in the x axis, and then 3 lines on the y axis showing the corresponding 3 values for all the dates. So far I thought using 3 different arrays to pass to series.data…
ESLint “no-implicit-globals” rule is being ignored
I’m working with some old Sencha Touch code, written in old-style JavaScript, that I’m trying to clean up. It’s too easy with this code to simply misspell a variable and not see the error, because nothing is being flagged as global or undefined. I’m trying to use ESLint to address this…
How can I fetch Clash Of Clans API?
I’m trying to do a discord bot with the clash of clans api. But I get a weird error message. Thanks Error Message: Answer The API URL is api.clashofclans.com and you are also lacking an API KEY in your authorization header unless you removed it for security purposes Clash of Clans API uses JSON Web Toke…
Compare objects within an array and create a new array without duplicates
I’ve an array of objects: I want to compare the objects within an array by name. If the duplicate name exists, I should compare the age and only keep the higher age object. The expected output should be: I am new to javascript/typescript and couldn’t find any optimal solution for this problem. I h…