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
2answers
13 views

Passing JSON object through loop to be used in jQuery Dialog

I'm wondering if there is a better (cleaner?) method than my current implementation. I'm currently encoding a PHP SimpleXMLObject (USPS Tracking API) to JSON and ...
1
vote
5answers
39 views

Using jQuery to restyle page depending on window width

I currently have a javascript file that I'm using to fix the navagation on on a website I've built. The code is by no means 'DRY' though and I'd like to fix that issue so I'm not repeating myself. Any ...
4
votes
1answer
46 views

Disable Element If

This is a pretty straightforward library function I've got here. I've had to build it in to about 3 different forms but I never heard of this kind of function anywhere else. I'm trying to make it as ...
6
votes
2answers
273 views

Updating the presentation of a credit card field as the card type becomes known

The goal here is to, add a credit card image, and remove all other credit card images, of a certain input field. I had a even larger code, with a lot of addClass() and removeClass()... then, I shrink ...
2
votes
0answers
34 views

Organising a JavaScript file

I have a JavaScript (jQuery) 'init' file with various variables/event handlers and functions that are currently written in no particular order. I've read that it's good to organise these by declaring ...
3
votes
1answer
40 views

Pomodoro Timer via setInterval

I'm hoping for some input on if my code is DRY or how I could have made it more efficient. I am pretty new in terms of jQ/JavaScript and this took me far longer than I care to admit. I will post the ...
-2
votes
0answers
17 views

Run function on resize [closed]

I'm trying to execute code on browser resize, this is my file ...
3
votes
2answers
57 views

Present waitlist dialog box if placement is full

I wrote an ugly mess of a JavaScript function that pops up a dialog box based on validation data, when a checkbox is clicked. I am wondering if it can be refactored somehow. ...
4
votes
1answer
44 views

Web-based test settings manager app

Background I work at a company that makes hardware products. All the test settings are stored on the server so it updates all our test stands. I'm currently working on a web-based app using ASP.NET ...
1
vote
2answers
86 views

Making equal-sized tabs to fill the full width of a box

How would you simplify the following block of jQuery code? I use this in a tab-box to size the tabs to style the tabs to the full width of the box no matter if it's 2 or 10 tabs... It works ...
1
vote
1answer
27 views

Synchronizing scrollbars, scrollTop and scroll event loops

I've been playing around synchronizing two scrollbars on a web application using JavaScript and jQuery (1.11.3). So far what I've been doing is any time a scroll event happens on one div, I use ...
4
votes
1answer
38 views

Limiting the number of text fields created

I need to make sure that the max of text fields created is limited to 10 at most. It's a script that I've ripped off elsewhere, and have modified it via help from StackOverflow on a couple of other ...
0
votes
0answers
33 views

jQuery form validator

I am new to the world of jQuery plugins, I don't know why I didn't get into this sooner. What I have a working validator that validates bootstrap styled forms. What I have discovered is that the way ...
3
votes
2answers
37 views

Adding and removing PHP parameters on click

I'm trying to optimize this repetitive piece of code. I think I need to set subsection href as a variable and then figure out a way to merge the functions? ...
2
votes
0answers
34 views

Share on social onclick using jQuery

I have the following code to share my website through some social networks when the user clicks some divs with the appropriate icons. ...
5
votes
1answer
50 views

jQuery Plugin - Sliding Tile Puzzle

I created a basic jQuery plugin to make a basic sliding tile puzzle. ...
1
vote
1answer
33 views

Social sites slider

I tried to make social media slider with jQuery, HTML and CSS. This is available as a Fiddle. Can I improve or debug any elements of it? ...
4
votes
1answer
24 views

Gives a live view to a changing file on server

I have a file on my server which contains a running output of a script. This file is constantly changing and fluctuates in size between 0 - 1Mb. Now I want to take this file and make it viewable from ...
1
vote
1answer
52 views

JavaScript accordion

I'm trying to refactor some code I wrote months ago when I used to use lots of anonymous functions. The way I'm trying to do it now is by taking all those functions and rewrite them within Object ...
0
votes
0answers
18 views

Bootstrap alert plugin

I'm now venturing into the world of function writing. I have pieced this code together getting a head start from Dynamically create bootstrap alerts box through javascript. I have added animation on ...
3
votes
1answer
32 views

Userscript hiding boxes on linkedin

When looking at people you may know on LinkedIn (requires you to be logged in) there are sometimes some annoying boxes that are for people who are email contacts but not on LinkedIn. I don't want to ...
3
votes
2answers
123 views

Mutually exclusive radio buttons

Here is a small code snippet I wrote that I feel is pretty naive. I copied the code directly from my project and renamed some ID/class names. I'd like to know how you could help to improve/refactor ...
-1
votes
0answers
21 views

Microsoft Logo Animation v2 [migrated]

I updated my animation of the Microsoft's logo. It's available on CodePen. Overall, I am quite satisfied with it now apart from one thing. I cannot seem to figure out how to stop the animation so the ...
7
votes
1answer
74 views

Small Calendar “Widget”

I have been working on a calendar widget for the past hour or so. I wonder if it could be compacted any more than it already is (ignoring whitespace). ...
1
vote
2answers
38 views

Getting paginated data from ajax call and putting the data on the page

At the moment, it gets the first page worth of data and then each subsequent page when the user scrolls down to the bottom of the page. My JavaScript/jQuery level is fairly weak, however I have ...
10
votes
2answers
1k views

Microsoft logo animation

I made an animation of the Microsoft logo. It's available as a CodePen doodle, also. Would anyone be so kind as to check my style and say if there is anything I could've improved? (I am sure there ...
2
votes
2answers
38 views

Loading more items for an activity feed that uses a global page counter

I have this script which is for a news feed. A button click will grab more data from the server if there is any and then add it to the box. It doesn't allow any more than 10 pages of results currently ...
4
votes
0answers
35 views

Recent top tags in Tumblr blog

A friend of mine asked me to write a script for showing the most used tags in her Tumblr blog in the last days. I saw it as a great opportunity for learning JavaScript and accepted it, as it seemed ...
3
votes
1answer
58 views

Generating a day event calendar based on an array of objects

I wanted to get some eyes on some code that I wrote, and see if anyone can help improve what I did. Just looking for some constructive feedback to help make my code more performant, and more elegant. ...
2
votes
0answers
35 views

Fading Alert boxes

I am currently working on some fade out alert boxes where once the fa-close is clicked, it will then fade out and then slide the rest of the alerts/content upwards. ...
0
votes
0answers
24 views

jQuery resizable plugin

Is there any way I can simplify this re-sizable solution? It seems too difficult and messy to me. Working example ...
1
vote
0answers
13 views

Slideshow scrolling photos horizontally using jQuery

I've written my own jQuery code to make a little slideshow. Functionally it does what I want but I find that the jQuery animations are fairly jerky and because I'm a beginner in JS and web ...
-2
votes
2answers
44 views

Prefered language code refactor [closed]

I would like to make this code more elegant and have it written in a more standard manner, but I cannot write anything better with my current JQuery knowledge. So I would appreciate any suggestions to ...
4
votes
1answer
96 views

Personal portfolio website

I recently created this website for use as a portfolio because I thought it would help set me apart from other internship applicants next summer. I created this website using a mixture of pre-existing ...
3
votes
2answers
63 views

Drop down menu plugin

I am making a dropdown menu in JavaScript for my website, and recently I decided I wanted to make it a plugin (as in, upload it on the web and make it compatible with other plugins). I am new to ...
3
votes
0answers
58 views

Appending script elements with variable attributes

eWay has a simple Pay Now button that is embedded as a script. There are other ways to use the eWay API to take a custom payment, but they are slightly more complicated and the idea was to keep it ...
0
votes
0answers
32 views

Single page web mini app clients

Task: a one-application separation of logic. I'm just learning to write patterns MV*. Have I used shared model of view? View: ...
0
votes
1answer
32 views

jQuery .validate() plugin, additional method to validate numbers

A while ago I've written a custom validation method for .validate(). It is a local validation plugin, with some limited validation. I was required to write a validation method with the following ...
3
votes
2answers
79 views

HTML5 Canvas game starts to lag 10 seconds after loading page

I got bored and started making a game using HTML5, CSS3, and JavaScript/jQuery. I've been working on it for about 2 weeks and it was running pretty well. Today I opened it and was moving the ...
0
votes
1answer
46 views

Scrolling event being fired too many times

This code works and does the job, but it's poor, rudimentary and has some issues with the scrolling event. Can somebody help me to optimize the scrolling event? Prototype Structure and desired ...
2
votes
2answers
37 views

Model object for form validation

In order to perform form validation, I have created a custom object: ...
5
votes
1answer
45 views

Drilldown navigation menu by replacing divs

I made an attempt at a menu, that comprises of just replacing <div>s by showing and hiding. Kind of like a drill-down technique. I have the feeling that it is ...
5
votes
1answer
46 views

Toggling a CSS animation

I'm trying to toggle a dropdown box that will appear and disappear upon clicking the button. ...
11
votes
2answers
198 views

jQuery plugin that makes a slider out of an <ul> list

This is one of my very first jQuery plugins. In short: it makes a slider out of an <ul> list filled with <li> items ...
1
vote
1answer
43 views

Website register functionality

I have two links in my header: Register Login I am not creating it dynamically. If the user clicks on "login," the login form will be visible, similarly for the register form. My registration: ...
4
votes
1answer
71 views

Basic JavaScript quiz app

I struggled my way through the first quiz and here are the results. Since I have some experience in jQuery I really wanted to use only vanilla JavaScript. I know the code is pretty choppy and there ...
-1
votes
2answers
53 views

Toggling class on mouse hover

I am using this code to add a class on mouse hover to a link button and remove it on mouse leave. ...
1
vote
1answer
41 views

Capture time spent viewing media

I've created some custom code that will capture how long a user spent viewing a picture. The timer will stop when the user clicks or escapes from the fancybox view. Is there an alternate way for me ...
1
vote
2answers
60 views

Emptying and populating an element in jQuery

I have written the following function to empty and then populate multiple elements using jQuery: ...
2
votes
0answers
23 views

Filtered Search Plugin

I need opinions on how to improve this code example github ...