Drop down menu by click

For my hamburger menu I am trying to build it so that it a drop down menu by click. For example if your press the plus symbol next to Item 1 the sub items of item 1 will drop down. I've added all of the items and sub items into the hamburger menu. ...
more »

2017-06-21 21:06 (3) Answers

How am getting this output ? Javascript ES6

Please find my snippet here, for (var i=0;i<11;i++) { setTimeout( () => console.log(i), 10); } How it print 11 for 11 times? since i was set < 11? if i console it without function it print 1-10 . for (var i=0;i<11;i++) {...
more »

2017-06-21 20:06 (2) Answers

Parameters from redirected url

I have some physical mail going out that will have url's specific to the recipients zip code. These will be clean url's that I will want to all redirect to a specific page that will have form fields prepopulated based on the unique url that the reci...
more »

2017-06-21 19:06 (0) Answers

Create nested object from multiple string paths

I'm looking for the best way to convert multiple string paths to a nested object with javascript. I'm using lodash if that could help in any way. I got the following paths: /root/library/Folder 1 /root/library/Folder 2 /root/library/Folder 1/Docume...
more »

2017-06-21 17:06 (2) Answers

Nested Promise structure order

I'm trying to achieve something a bit tricky as I'm not used to Promise yet. I want to fill a map of <Id, ObjectInfo> I have two API points : one gets all users the other one gets the ObjectInfo given an Id This is what I have : const re...
more »

2017-06-21 17:06 (1) Answers

Conditional ng-repeat ui-router

I'm using ui router ($routeprovider and $locationprovider)for angular js. I want to change the array of which to loop through in a ng-repeat depending on the current url/route. I have read similar posts here on stack but can't find an exact solution ...
more »

2017-06-21 16:06 (1) Answers

Simulating going online/offline with JSDOM

We are working on a tutorial for the basics of offline first apps, and are using JSDOM with Tape to test our code. In our code we update the DOM so that a text node changes from saying "online" to "offline" and vice versa by attaching an event listen...
more »

2017-06-21 16:06 (1) Answers

How to keep table values after searching?

I created a JavaScript filter to filter records from a product table, the filter is working normally, the problem is that when I clear the filter values, the table is returned in a different order. For example, my table is organized in Controller as...
more »

2017-06-21 15:06 (1) Answers

How to get number of arrays in a JSON object

Below is my JSON. I want to get number and name of array(s) in this object. This is dynamically created so I don't know about its number and name(s). Here are 2 Arrays in this example, named Table and Table1. "{ "Table": [ { ...
more »

2017-06-21 14:06 (3) Answers

Call show.bs.modal event before parent event

I have a bootstrap button (I used bootstrap 4) that open a modal and transfer the data that in the button to the form in the modal by the function: $('#exampleModal').on('show.bs.modal', function (event). the button is in a div (parent). when I c...
more »

2017-06-21 13:06 (1) Answers

Async Code Splitting Webpack - Unexpected Token

I was just following this guide I have this code: import React, { PropTypes, Component } from 'react'; import('contact-page').then(() => {}); I get this output: This is my webpack file: var webpack = require('webpack'); var packages = requ...
more »

2017-06-21 11:06 (1) Answers

Prevent duplicate $.ajax calls using result cache

A similar question has been asked before, but I don't believe it overcomes the challenges in this case because my function calls are all together, so please bear with me (I'll delete the question if appropriate). I have a number of dashboard widgets...
more »

2017-06-21 11:06 (1) Answers

Check today if in dates array

I'm trying to check if today ( at 0:00 ) is in a dates array, like so: var today = new Date(); today.setHours(0, 0, 0, 0); var holidays = [ new Date(2017, 5, 21, 0, 0, 0).getTime(), // Today new Date(2017, 5, 22, 0, 0, 0).getTime(), ...
more »

2017-06-21 11:06 (3) Answers

cakephp pagination ajax request doesn't work

I am very annonying with cakephp ajax pagination. i am working with a big project where i need a page with ajax request with pagination. So let me explain what i want. On one hand, i want a ajax pagination(that works very well) but on the other hand ...
more »

2017-06-21 09:06 (0) Answers

Unable to understand javascript syntax

I was going through the code of react-jsonschema-form.I came across following lines which I am unable to comprehend. var formData = (0, _utils.getDefaultFormState)(schema, props.formData, definitions); How is content within the first bracket a fun...
more »

2017-06-21 08:06 (2) Answers

Rookie wants to send email from a web page

I'm just hoping you can point me in the right direction. I know Javascript (pretty well, but I do NOT use JQuery, fyi) and have a site where I want folks to fill out a few fields, including their email address, and click send and it will automaticall...
more »

2017-06-21 08:06 (1) Answers