a JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development.
0
votes
0answers
14 views
Collect several API call results
Want to brush up my rusty web dev skills. I want to call the twitch API for several channels and eventually call a callback function when all results are in without using a sync call.
I didn't work ...
-1
votes
1answer
38 views
1
vote
0answers
14 views
jQuery templating with ES6/ES2015 template strings
I have been using a particular pattern over and over again when I want to keep my jQuery apps more safe from XSS. I do something like this. (It uses ES6 template strings)
...
2
votes
3answers
81 views
Javascript Ownership Cost Calculator
Javascript newbie here. I built a total cost of ownership calculator to calculate the cost of a business over 5 years. It has a lot of repeating script and prob way more congested than it needs to be ...
0
votes
0answers
17 views
Event Delegates using IIFE or Module
I am learning jQuery/JavaScript best practices and am attempting to put them into practice. My overall goal is to have lots of small, independent .js files which contain specific functionality and ...
1
vote
1answer
58 views
Match values inside object and add them
Does the following code is written correct witout redundant code ?
or maybe using Jquery it can be written better?
I need to find matching between properties insdie oData & oPushObj
and fill ...
-3
votes
0answers
22 views
Need someone to help reviewing and improving my JS (javaScript) coding [closed]
I need my JS (javaScript) coding to be improved base on the following requirements:
PROPER EVENT BINDING: Consider using the preferred .on() method rather than .click(), .bind(), .hover(), etc. For ...
-1
votes
0answers
16 views
How filter a grid from a tree list
The Tree has a list of car ids, group by how old was the last update. User can select a group or just a few cars to watch on the detail grid.
Im using Jquery Ajax to call my WebApi.
With ...
1
vote
1answer
68 views
Is Nesting Events a Good Practice in Javascript/JQuery?
I posted this question in stackoverflow and they told me it would be better served here so here it is:
Is there a more effecient way of changing the mouseout state ...
3
votes
1answer
89 views
Simple JavaScript quiz application with radio buttons
I've created a simple JavaScript application, which also happens to be my first-ever piece of code in any programming language.It took me two days to get the core correct and another two days for ...
3
votes
2answers
136 views
Driving equation output from select input boxes via JavaScript and HTML
I would like to create a simple interface to allow a user to make a few choices via select boxes and drive a resulting equation.
Here's a screenshot:
This is a gross simplification and I am ...
2
votes
2answers
100 views
Calling multiple plugins inside script tags
I'm not that comfortable with properly writing jQuery. On my website I've used a lot of jQuery plugins and basically just dumped all the different initiating scripts between two ...
4
votes
3answers
99 views
A reusable AJAX polling function
I have written a small JavaScript function which performs an AJAX request every x seconds.
I was hoping some of you could give it a look over and give me any pointers on redundant code or bad ...
2
votes
1answer
27 views
Rendering comments in a Backbone view
I want to make show/hide logic more maintainable in my codebase.
Because they are too faraway located in separate js files, it hard for people to maintain.
The flow in my codebase is:
...
3
votes
1answer
37 views
Renaming the iframe src attribute to facilitate lazy loading
I'm not great with javascript. I need some code to rename all iframe src attribute names to data-src, for a lazyload plugin to ...
3
votes
3answers
35 views
Set same color as prev row if data matches otherwise different color
I have a requirement in which I need to set color of two or more rows of a table same if they have same value in cell one and I have to maintain this alternatively i.e. no 3 or 4 rows should have the ...
3
votes
1answer
93 views
Clickable and automatic image slider
I created a slider that fades images automatically but you can also click to see the next or previous image. It already works how it should. But I think my code is really heavy. I am not experienced ...
1
vote
1answer
30 views
Polling hash change
I've discovered that Google Chrome on iOS doesn't fire the hashchange event when the back / forward buttons are pressed.
Reference:
...
3
votes
1answer
72 views
Fading content for each TD
I have an HTML table and I use jQuery to fade some content for each TD:
Demo
My code works great, but I want to know if my solution can be better.
...
3
votes
2answers
49 views
Optimzation removeClass() and addClass()
I am trying to simplify and optimize these line of codes.
This is a jQuery function controls a <div> to expand up or expand down.
This is my coding ...
2
votes
1answer
67 views
HTML Table with Selectable cells
I'm working on a scheduling table that user' can select cells (which will be gathered with jQuery using data attributes) but I'm trying to work out the best way for user' to be able to select rows and ...
4
votes
0answers
51 views
Ajax bootstrap modal form function
I made a few functions to handle an Ajax post request for a form inside a bootstrap modal, and then update the form errors / display a success message disappearing with a timer countdown upon valid ...
2
votes
2answers
63 views
Keyboard handler for selecting radio buttons
I have got my JavaScript working as seen here:
https://jsfiddle.net/yLg1qs04/3/
But how do I condense/shorten it so that it's not repeating itself so often and taking up so many lines?
...
0
votes
2answers
37 views
Scaling and cropping an image adaptively based on the window dimensions [closed]
I've tried my best (I'm new to JS) to write a script that make an image fit to its parent div with respect of the ratio and overflowing when needed.
For example, if the ...
3
votes
1answer
55 views
Adding and removing classes at different heights on page using jQuery
I want to remove/add classes when the user is at different distances from the top by using jQuery.
I have successfully done it, and it works fine, but I think I'm doing it wrong, and I would like ...
3
votes
0answers
39 views
Ajax login response [closed]
I want to create an Ajax-Login, but I'm not sure if my solutions is generally correct. I want to do everything correct, so I need someone who checks this code and give me some improvement hints.
...
1
vote
1answer
72 views
Weather app using the openweathermap.com API
I have been working on a simplistic weather application that utilizes the openweathermap.com API. I have an ajax call to make an HTTP request to get a JSON object that contains the data which is ...
2
votes
0answers
48 views
Displaying a list along with multiple event listeners
This is one part of my website, it fetches a list of habits from my Restful API.
Each description of habit in list gets append to a list item in the HTML. During this loop, a event click listener is ...
0
votes
0answers
25 views
Extracting articles mentioned in comments in three GET requests
I need to make several HTTP GET requests and do the following stuff:
When all of them will be completed, I need to parse each HTML
After HTML parsing or in case of any error I need to set flag ...
0
votes
0answers
14 views
Processing the results of several GET requests via jQuery
I need to make several HTTP GET requests and do the following stuff:
When all of them will be completed, I need to parse each HTML
After HTML parsing or in case of any error I need to set flag ...
0
votes
0answers
19 views
Sporadic div positioning using Isotrope
I am currently using jQuery + "isotrope" to make an image gallery where images can be filtered using "data-filters". But "Isotope" uses grids to organise the divs but I would like something like the ...
5
votes
1answer
60 views
Front End Web exercise, no HTML
I was given the following instructions
Using the below HTML, using ONLY CSS, JavaScript or jQuery create the following (see attached gif animation):
...
0
votes
2answers
50 views
Page for personal portfolio animations
I built my portfolio page using Bootstrap and jQuery, but on lower performance computers the animations seem choppy. I am interested in JavaScript optimization and was hoping you all had some ideas on ...
1
vote
1answer
107 views
Simple JavaScript Calculator
I built a simple calculator that supports addition, subtraction, multiplication, and division. It can also chain operations. I'm looking for feedback on my code for places that could be done better in ...
2
votes
1answer
45 views
If/ else if statements to show and hide
I've got some if and else if statements to show and hide svg elements and it works the way it should but I wonder if I can shorten the code since it looks so repetitive.
I'm not sure if it's ...
4
votes
1answer
56 views
Controller for a vehicle servicing AJAX app
I am working on a codebase that operates in the following manner:
...
2
votes
1answer
37 views
Converting a string to two strings
I have the following code that converts a string that looks like:
aaa-bbb|ccc-ddd|eee-fff
to two strings that look like:
aaa|ccc|eeeandbbb|ddd|fff
The ...
3
votes
3answers
88 views
Multiple jQuery onClick events
I have a ton of jQuery onClick events. onClick I hide/show different UI elements. I was wondering, how can I tidy the code up ...
0
votes
2answers
63 views
Custom sorting function implemented as a jQuery plugin
I was asked to create a jQuery plugin that would sort homogeneous DOM elements in a given DOM container element.
I came up with the idea to attach data-priority ...
1
vote
2answers
94 views
Fetching data from nested JSON using jQuery and displaying in table
I'm displaying JSON data in a tabular format on a html page using jQuery.
In the function I'm looping the resp.DATA once to get the key names so it can be ...
1
vote
0answers
28 views
Large table updates using AJAX in Internet Explorer 11 (Cont'd)
Previous topic: Large table updates using AJAX in Internet Explorer 11
For the functions included here, I have taken the advice of the previous answer and incorporated it in the restructure, but am ...
3
votes
2answers
87 views
Large table updates using AJAX in Internet Explorer 11
I have a website which only needs to support IE11. It is a single page application, which has about 200 table rows and each table row has 5 child rows.
There is a pulsing function that updates the ...
0
votes
1answer
40 views
Creating a wrapper function for jQuery ajax
I am creating a few functions that wrap around jQuery's ajax function to make it a bit quicker and easier to preform a request. For this I have this JavaScript file:
...
2
votes
1answer
56 views
Updating HTML table (Userlist) with Node.js
I currently have an HTML <Table> with all the socket.io-rooms. Client-side, the table gets fetched if you visit the page. If some room gets created or ...
3
votes
2answers
39 views
Changing images when hovering over links
I wrote a script to change a static image by hovering over navigation links. It works great, however, the script is very long and I'm guessing there is a much more efficient way to write this code. ...
1
vote
1answer
104 views
Keep div fixed when it is inside it's container on scroll
The required behaviour is :
The yellow span must be positioned relatively to viewport (position:fixed;) when it is inside the pink div.
The height of yellow span ...
0
votes
1answer
49 views
Four jQuery date time pickers
I'm using the Jquery date time picker link here
In the four methods below I am initializing the DT pickers but they are all pretty similar except for the ID in the ...
3
votes
4answers
221 views
Color swatch selector with multiple mouseover and mouseout functions
I am working on a simple mouseout and mouseover functions. Basically, I have color boxes (or swatches) and I have to get the color of the specific box when hovered and when selected. You can see how ...
3
votes
1answer
60 views
Small HTML / JS drum machine
This is just a simple little drum machine. Since it loads sounds files, I can't just put it on JSFiddle. I tried Github pages too, but am not sure how to get the sound files working. However, you can ...
2
votes
2answers
247 views
jQuery fade in and out with multiple objects
This set of code is very large, and I'm hoping if someone could show me a more efficient way of doing this. In particular, the JavaScript code, but HTML and CSS corrections are just as welcome.
...