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

learn more… | top users | synonyms

2
votes
0answers
9 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 ...
-4
votes
0answers
17 views

How to correctly implement button definitions [on hold]

I have a few files that contain a lot of button definitions like this: ...
1
vote
0answers
15 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 ...
-1
votes
0answers
36 views

Website optimization

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 ...
1
vote
0answers
37 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: codepen ...
2
votes
0answers
26 views

JavaScript Audio Player

Looking for feedback on any bad practices and general advice on how I might better structure my code. ...
-2
votes
0answers
12 views

Delaying Jquery CSS Animation using mousemove [closed]

I've been trying to put 10 seconds delay on this jquery css animation which is dependent on mousemove. I've tried unsuccesfully utilizing both .delay and .setInterval right before like so: ...
2
votes
2answers
71 views

jQuery make DRY two almost identical on click function

Is there a simple way to DRY this jQuery code? ...
1
vote
1answer
71 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
20 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
25 views

jQuery form change listener, modularized using ES6

I have the following javascript code that I'm trying to modularize using ES6: ...
0
votes
1answer
30 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
21 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
29 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
55 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
30 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 ...
4
votes
2answers
81 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
51 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 ...
1
vote
1answer
40 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
50 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
79 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
24 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/ ...
3
votes
0answers
78 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
26 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
23 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
33 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 ...
1
vote
0answers
27 views

jQuery VLOOKUP() script

The script below demonstrates VLOOKUP by showing which languages appear from column 1 in column 2. Is there a way that I can refine my code to pass in an exact ...
2
votes
1answer
32 views

Updating a stats bar on a page

I'm updating a stats bar on the page after a user action. The code works, but as you can see, it's very messy. Is there a shorter way of writing this function? Seems like a complete mess. I thought ...
1
vote
0answers
50 views

Splitting text into individual characters for animation

I have code which makes use of jQuery and some additional libraries. But the jQuery part is too overwhelming (and thus it does its job slowly). So I tried to optimize it, and faced no luck. Now I seek ...
2
votes
1answer
130 views

Session expiration handler using PHP and jQuery

At this point i am interested to see other techniques on handling session timeouts. What are some good improvements on this script to detect when a session is no longer valid? Important definitions: ...
-1
votes
0answers
17 views

Trying to understand Jasmine testing

Let's say in my application I have a script that triggers a click event on an html id. I want to then test that event in Jasmine. Below is the test I have in place for this scenario. I have a few ...
1
vote
0answers
21 views

Loading multiple remote resources

I've created a class that allows me to load resources, execute a callback after each individual request has been made and finally, a final callback that can assume all said resources are available. ...
4
votes
1answer
29 views

Using EnquireJS to trigger swapping image sources per media query

For responsive images I have come up with a first draft of how I would like to swap image sources depending on media query. This works fine and with the added debouncing function from Paul Irish the ...
0
votes
1answer
74 views

Change the switch code

there is a other way to write in JS the switch statement , This code is working :) ...
1
vote
1answer
25 views

Is this a good way to create a Javascript object? [closed]

I'm building a simple quiz app and wanted to make it more scalable by putting my code into an object. The parameters list looks a bit messy to me. Is this a normal way to use an object or is there a ...
3
votes
1answer
32 views

Optimizing jQuery list filtering

Scenario Currently filtering through a list of ~3100 rows of data presented to the end-user in the form of an index (think, list of car models). This is done in such a way that every item is ...
3
votes
1answer
34 views

Vertical cycle slideshow

I want to make a vertical cycle slideshow. This works perfectly for me but I'm just wondering if it's possible to achieve the same functioning with a better code. I don't know if my code would provoke ...
3
votes
1answer
46 views

OOP and non-OOP versions of layout and page animation code

I am trying to learn how to write more object oriented javascript code, but I am having a hard time understanding the correct way to do it, and how it is useful for front end development. As you can ...
2
votes
1answer
51 views

Stock performance app

I'm building an app that tells you a stock's percentage change in price between two dates by using Yahoo's API. Given a stock ticker and two dates, it currently outputs the percentage return to the ...
3
votes
1answer
72 views

Editing HTML based on instructions in a data structure

My getExtend() function, which will be included via require.js, has two inputs and one output: HTML file content config object which determine how to ...
1
vote
1answer
38 views

Custom form validation using jQuery

Recently I have been doing a bit of work with Contact Form 7 and Wordpress. I've begun looking at form validation using ...
4
votes
2answers
91 views

Parse HTML to modify it

I'm using the following code to parse html, This code is working but since I'm new to JavaScript and working in alone project I would appreciate if you can give me some tips and feedback how can I ...
4
votes
2answers
27 views

Window-size-dependent content toggler for an HTML form

I had to build a responsive component which allows the user to display specific content in a page. I called it the contentToggler. Here is my component in action ...
2
votes
1answer
75 views

CSS3 Dropdown Menu (touch device or mouse compatible)

If you'd like the files: https://github.com/agraymd/Animated-Profile-Menu Working Demo: http://jsfiddle.net/tddfevhv/1/ This may be rather basic, but I wanted to experiment and learn with some of ...
0
votes
1answer
82 views

Wikipedia search using the JSON API

I ask to you. What I could do better in my code or logic? This my example on Codepen -> Wikipedia Search ...
5
votes
3answers
85 views

Fancy checkbox for web pages

I just finished creating a fancy checkbox and am hoping for some tips to help improve my code, as I am still learning. ...
1
vote
1answer
60 views

jQuery toggle buttons to show matching content in sliding panel

I have a sliding panel that I want to show content in. The content that I want to appear depends on the button that triggers the sliding panel. My project is growing rapidly and I would like to ...
-2
votes
1answer
37 views

Dropdown menus with toggling ⬇︎⬆︎ icons

I have some html and js codes. I can't understand how can I dry up this codes. I am using bootstrap-3 and jquery-1.11.0. on my js code I have some dropdowns. In dropdown I used a icon. When the ...
1
vote
0answers
21 views

Make jquery pagination more efficient

I am trying to create pagination with pure PHP and jquery. I have done this and it works exactly how I want it to work. Essentially I get all products from my database using PHP. I then populate the ...