a JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development.

learn more… | top users | synonyms

0
votes
0answers
25 views

Loading an animation with an Ajax request

I am not sure if this is the correct way to make an Ajax request and do the typical loading/processing GIF/animation while processing is happening and displaying the response. HTML: ...
1
vote
1answer
20 views

Sidebar menu to hide or expand parts of a form

I have some of my code that I have tried to improve on to make it cleaner and efficient and I would like some feedback to see if I am going in the right direction with what I am trying to do. I have ...
1
vote
1answer
37 views

Event handler for conditions

I am trying to detect whether a condition is being returned true or false. The only problem is, I have a bunch of if/else ...
3
votes
0answers
68 views

Showing the slide named in the query string and hiding the others

I have this all figured out now thanks to the help of a mod. Here's the working code: ...
1
vote
0answers
28 views

JavaScript / jQuery Memory Guessing Game

I want some tips on how to make my code better, more efficient, better coding practices, etc. Codepen ...
5
votes
1answer
105 views

Simple restaurant menu

As stated in the title, the code produces a simple drop-down menu that allows you to select your Starter, Main and ...
0
votes
1answer
38 views

While focus on input check if empty

I made a small function that is getting looped when an input is getting focus and stopping the loop when the input is losing focus. Now I would like to know if there is a better way to write this code....
0
votes
4answers
16 views

Series of jQuery click events

I have the following series of click events in my jQuery code: ...
4
votes
0answers
31 views

Reading and updating an XML address file

I have some code that reads from an XML file and updates if needed. I want to move some of the stuff around. Here is the code overall: ...
0
votes
0answers
39 views

JS timer plugin

This code operates as intended, but with only with two operational timers running. I need the resize event in the match section as I need to retrieve the window ...
3
votes
3answers
69 views

Wikipedia Viewer

This is one of the projects on freecodecamp. I would like a review on my code. Thanks in advance. Javascript: ...
4
votes
1answer
62 views

A Game Of Simon

This is one of the projects from freeCodeCamp. It's a game of Simon (a memory game). I would like a review on my code. ...
3
votes
2answers
65 views

Javascript bar graph representation using CSS

This js was written strictly for a visualization of a graph redesign included in a stats report within our game systems. It all works properly, but I know there has to be a much neater way to organize ...
2
votes
2answers
41 views

Selecting one form to be visible using jQuery

I'm new to JQuery but have managed to get it working the way I want. The problem is, it's a bit convoluted and could easily get out of hand if I add more options. I am trying to show and hide divs ...
5
votes
2answers
147 views

My online hangman solver

I've created a simple hangman solver at solver.lukesalamone.com, and although I'd consider myself proficient in webdev I am by no means an expert. The trick with this is that since HTTP is stateless, ...
2
votes
1answer
37 views

jQuery menu state is-active

I have this menu in jQuery that works perfectly, but I think it would be better if, instead of using class="btn-accordion" for each ...
1
vote
0answers
26 views

Selecting up to three thumbnail images using jQuery

I have written something in jQuery but I'm not sure whether it is an elegant solution. Every click needs to check the DOM for classes/and add and remove classes. Any feedback or suggestions would be ...
4
votes
1answer
58 views

Javascript promises, multiple api calls in then()

This is the first time I'm trying to use promises in JavaScript so I'm not sure if I have done it correctly but it seems to work. The problem is that I have ended up with a "nested when" and it doesn'...
-3
votes
1answer
52 views

Simple code refactoring in javascript [closed]

This code is working but there's a lot of duplication, how can I refactor it ? ...
1
vote
0answers
39 views

Counting and listing words in a table

I have recently carried out a test for university where I was given the following instructions: Write a simple JavaScript application that reads paragraphs of text input by the user and creates ...
2
votes
1answer
72 views

Validate a form using jQuery

I am validating a form using jQuery. It is working perfectly, but I just feel the code is quite "bulky". There is a lot of if statements being used to achieve ...
2
votes
2answers
49 views

Show and Hide group of classes based on data attributes

Somebody please verify this code. Is this efficient? please tell me modular way to accomplish this task. Updated I want to add show class to ...
3
votes
0answers
22 views

Menu of triggers reveal corresponding dialog elements

So I have this code that for the most part, does what it needs to do, but I'm having trouble making it more concise and elegant. Codepen Intended functionality: If you click a trigger, it's ...
1
vote
1answer
23 views

Select the correct input when using input group after pressing a button

Introduction: I'm creating a form using bootstrap and I have different input groups with the same structure and functionality. All of them have a '-' button on the left and a '+' button on the right ...
2
votes
1answer
65 views

Graphic Ape Designs gallery website

I am currently working on my YR9 (I'm 14) IST web development project and I want to know some tricks for optimizing my website. I know that I shouldn't have the same CSS rules in the style tag on ...
2
votes
2answers
90 views

Responsive horizontal scroll on mouse position

I am making a responsive horizontal scroll UI. The horizontal scroll position is calculated according to the mouse horizontal position: ...
3
votes
0answers
31 views

JavaScript Audio Player

Looking for feedback on any bad practices and general advice on how I might better structure my code. ...
3
votes
3answers
100 views

jQuery make DRY two almost identical on click function

Is there a simple way to DRY this jQuery code? ...
1
vote
1answer
78 views

Turn script into a function which extracts the div ID and places it inside

Alright, so I've got this script which basically drains the thumbnails and streams from the twitch API/JSON. ...
1
vote
1answer
24 views

jQuery code for displaying server status from XML feed

I am using the below jQuery and HTML to read in and use an XML server status feed for a server widget. This is the code: XML Feed: ...
2
votes
0answers
32 views

jQuery form change listener, modularized using ES6

I have the following javascript code that I'm trying to modularize using ES6: ...
1
vote
1answer
36 views

Factory that Creates Reusable Class Builders for a Racing App

In a project for fun/practice, I made a few builder classes that all started to feel the same, so I decided to generalize them by creating a factory that would automatically assign the similarities ...
1
vote
0answers
25 views

Pomodoro clock in js

I created a JavaScript library on Pomodoro time management method. I don't know if it's good so I though that you can help me with reviews. ...
0
votes
0answers
30 views

How can i write this code in a shorthand function? [closed]

I am working on an interactive map which highlight specific areas. Now I fixed it but I have a shitload on code I started to write it out in a function but don't know how to start. I hope someone can ...
0
votes
1answer
62 views

Generating HTML code dynamically with jQuery

I am doing a college project and I would like to write my jQuery code following best practices. The project involves using the jQuery .getJSON method to retrieve information from a json file. I have ...
1
vote
0answers
42 views

jQuery placeholder plugin checking

I have been experimenting with jQuery and HTML placeholder plugin for practice work. I've used this jQuery plugin. I've checked it in IE8 in, it seems it works. Could you please check and write is ...
5
votes
2answers
94 views

Restrict HTML input field to decimal

I'd like to restrict user input in a form to a decimal with max two numbers before and 4 after decimal point. Valid values would be: 50 0.1 1.23 4.5678 12.943 ...
3
votes
1answer
56 views

Generating jQuery mobile “pages” dynamically

I'm doing a college assignment with jQuery Mobile and JSON. Best practice with jQuery mobile is my main concern. My html starts off with a main 'page' (data-role="page") inside a div with id="all-...
2
votes
1answer
48 views

Cross browser JavaScript implementation of xhr

I wrote a small, cross browser compliant implementation of xhr requests in client JavaScript that closely follows the jQuery $.ajax() API and standards. The goal is ...
2
votes
2answers
51 views

Tag dependence approach

I need to add class is_active to all div's when I click on <div id="all-tags"> and remove class if I click again. Only ...
1
vote
1answer
20 views

Custom Kit Form Validation

I have an HTML form where I need to do the following when value of Select Box changes to initial "Not Selected" value (where values of the option is 0), I am to highlight the select box, when it's ...
1
vote
3answers
81 views

Get part of element ID

I am getting the number part of the container ID that the button is in. Now I am wondering if I need to create an array using split and then put this number in a ...
0
votes
0answers
25 views

large shipping form

I made a form for shipping calculator. I used backboneJS. as a result the user sees a modal window with the entered data https://jsfiddle.net/9t1cwfrv/7/ https://github.com/zlodiak/...
3
votes
0answers
84 views

FizzBuzz… with style (js, jquery, html, css) (and questions…)

I discovered the FizzBuzz test while looking up something else on stackoverflow, so I decided to try it and see what I would come up with. I'm kind of new to jquery and js, so I'm looking for a ...
2
votes
1answer
28 views

Shipping calculator consisting of one field

A made a shipping calculator, which consists of one field that is validated. jsFiddle HTML: ...
0
votes
0answers
24 views

Improving function that does an animation with JQuery .animate()

I'm a newbie with the JavaScript language. So I really appreciate any tip about how to improve my code. I'm used to code in java. Then I want to know if there is any way to abstract my function, ...
0
votes
0answers
36 views

Message-Div animated with changing colors

I've made this animation with jQuery and Animate.css. Could be surely improved. Currently I'm using 125 (5^3) different colors. If one extends the amount of colors, or respectively the filling of ...