Questions tagged [javascript]
JavaScript (not to be confused with Java) is a high-level, dynamic, multi-paradigm, object-oriented, prototype-based, weakly-typed language used for both client-side and server-side scripting. Its primary use is in rendering and manipulating of web pages. Use this tag for questions regarding ECMAScript and its various dialects/implementations (excluding ActionScript and Google-Apps-Script).
1,779,866 questions
0
votes
0answers
3 views
Does having two exports increase bundle size
If I have the following code
class x {
...
}
export CreateFragmentContainer(x,graphqlQuery)
Will the bundle size of my project if I do an another export of class x without the fragmentContainer ...
0
votes
0answers
6 views
how to to retrieve data from MongoDB using Javascript and NodeJS
On April 8 2018, Lineus answered about the following post : How to debug JavaScript that won't retrieve data from MongoDB?.
Is there a new up-to-date script for his work ?
My version of "mongoose": "^...
0
votes
0answers
10 views
Is there anyway to stop/close the javascript function?
there is javascript call function
myfunction();
Is there any way to stop/close the javascript function?
0
votes
0answers
4 views
Data is not add in DOM Tree /dynamically to table
Problem
I am trying to make a Dyanamic(CURD operation) DataTable in Django But when I am
Dynamically Add / Delete / Update Data it is not add to DOM/ Datatable.
i am using Ajax,JQuery. please ...
-2
votes
0answers
15 views
Get Element By Id in JavaScript for CSS child elements [duplicate]
How do I .getElementById in JavaScript for CSS child elements?
CSS:
#topNav > nav > ul > li:nth-child(1)
#topNav > nav > ul > li:nth-child(2)
JS:
document.getElementById('child1')...
0
votes
0answers
22 views
Nested loops and to keep the index count going in the second one
I got two nested loops and I'm trying to increment a counter in the second one, so basically that the count does not reset.
now: 1 2 3 4 1 2 3 4
want: 1 2 3 4 5 7 8
In vanila javascript I would ...
0
votes
0answers
23 views
CSS not loading in localhost
It was working previously but I can't pinpoint where the source of the problem is.
I'm importing my styles.css folder with index.js. I swapped some JS code around, the problem happened, and after ...
-2
votes
0answers
10 views
Migrating John Resig's Simple JavaScript inheritance to pure ES6/TypeScript
I have an extensive front-end that was developed in 2011 using Resig's Simple JavaScript Inheritance as the framework. It also strictly requires a var self = this; in every block, I believe these can ...
0
votes
0answers
7 views
Bootstrap: how to prevent full tab-pane activation when changing tab
I have spent too much time trying to change the behavior from my bootstrap tab panes. I mean, when I click to another tab (the flags in pitcure bellow), I want the focus goes to the first field from ...
0
votes
1answer
18 views
Table cells unintentionally change size after a click event
I am dynamically building a table using JS but, for some reason, after clicking on the btn_dropdown0 "button", which is supposed to hide and show the tbody, the button itself gets slightly moved left ...
0
votes
0answers
7 views
Getting a Parsing error on a template string with ESLint, but I have ECMA 6 in config file
I can post my whole config and JavaScript file if needed, but I am trying to run ESLint on some JavaScript I'm writing.
My 'eslintrc.json' file has this in the config (with some other rules):
"rules":...
0
votes
1answer
15 views
Where to put helper functions of a functional component ? what's best for performance?
The place we put our helpers in a functional component would affect the performance of the component ... I mean what's better when it comes to performance ... to put it outside or inside the component?...
0
votes
0answers
14 views
React JS compiles but does not show content on page
I am working my way through a project built using ReactJS, and I have come across situations where my code compiles just fine, but nothing displays when I navigate to localhost.
My program is a ...
0
votes
0answers
5 views
JQVMap Labels not rendering at correct position
I am trying to use the JQVMap in my website, but somehow i don't know why it does not render default labels at correct position.
The code that i used is below
<div class="container-custom">
...
0
votes
2answers
14 views
React : TypeError: Cannot read property 'Item' of undefined
I want to access the value of state/property in new state prop. Actually I have already state property where I am storing value of Item=5 and I create UrlParam Where I am storing URL but I need Item ...