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

learn more… | top users | synonyms

1
vote
1answer
28 views

Adjusting the height of a div to match that of another column

This code checks whether an image whose parent is .papers.left has completely loaded into DOM and if yes then the background of ...
-3
votes
0answers
17 views

JavaScript problem displaying variable in console.log [on hold]

I am currently taking an online class and there is one unit on JavaScript/Jquery. As this isn't the focus of the course I am kind of lost. I have been following along and I did everything as shown but ...
-1
votes
0answers
11 views

Diplay of radio buttons onclick of a radio button [on hold]

I have a list of radio buttons which the count of them will dynamically be varying. But, each radio button onclick has to display 2 radio buttons under them. below is my code JSP : ...
-1
votes
1answer
26 views

Shorten jQuery code

Is it possible to shorten the following jQuery code into one single block? At the moment, the current code is 2 blocks, but it is practically identical. I tried adding ...
5
votes
2answers
60 views

Lazy loading social buttons on mouse enter

I am using the following code to lazy load some social buttons in my personal blog. Before continue, I would like to enumerate some dependencies first: jQuery 2.1.4; Using Font Awesome 4.1.0 (but ...
3
votes
1answer
44 views

Printing a huge document

I have a web page containing n pages of paged data, showing 20 records at a time. The front end has a link to another page that opens the same data, but without the paging and calls ...
0
votes
0answers
17 views

jQuery plugin that filters and orders boxes with CSS transform

I made this jQuery plugin based on MixItUp and Isotope. In short, one needs to create an <ul> list filled with <li> ...
4
votes
3answers
63 views

Get multiple minimal number from array

I have script for get three values (minimal numbers) from array : ...
1
vote
1answer
25 views

Menu visibility toggle method

I've just created a method that toggles menu visibility. At the moment I've gone with an if..else which checks my flag and acts ...
1
vote
1answer
16 views

Keyboard shortcuts Customization

I have created keyboard shortcuts menu,same as like this stackoverflow keyboard shortcuts.In multilevel. Scenario ...
6
votes
2answers
181 views

jQuery plugin to cycle through text and “typewrite” it out

I have written a jQuery plugin (my first for a long time) that simply cycles through strings of text in a data attribute and uses setInterval to type it out - it's ...
1
vote
2answers
79 views

Reduce jQuery append method

Is this the simplest way to write this? This code evaluates if a textbox value exceeds 20 characters, and then displays the proper message (essentially truncating the string and then adding an ...
2
votes
1answer
70 views

Phone number format and data entry restriction

I created a form that formats phone numbers, allows only allowable keys to be pressed, and converts a lettered entry into its corresponding phone keypad number. Is there some cleanup or better coding ...
4
votes
1answer
33 views

JavaScript Canvas Animation

This animation makes my fans spin up after several seconds, and it seems to have a sub-par framerate. I am trying to understand why, and optimize its performance. Codepen The animation function ...
2
votes
0answers
46 views

Playing with validation

This code is part of an application page, which lets user select existing or add new members, For email and Username it needs to call web services to see if they already exists then validate ...
3
votes
2answers
74 views

Style guide template engine

I'm new to JS and am trying to write a perfectly clean source code. I'm using gulp to concatenate and minify my files, as well as removing comments. So the end result will always be the same in ...
2
votes
1answer
30 views

Compressing .hover

I have 5 or 6 ID's and I need to compress .hover jQuery into smaller amounts. I tried this answer, but due to how he needed only 1 "group" inside the ...
0
votes
1answer
39 views

Fibonacci Sequence - Faster method?

Just decided to make a quickie Fibonacci Sequence via jQuery and I was wondering if anybody can think of a faster way to interpret it? I can type pretty much any number in and it returns in a fraction ...
5
votes
3answers
79 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 ...
2
votes
3answers
66 views

Using jQuery to restyle page depending on window width

I currently have a JavaScript file that I'm using to fix the navigation on a website I've built. The code is by no means 'DRY', though, and I'd like to fix that issue. ...
4
votes
1answer
62 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
275 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
41 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
56 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 ...
3
votes
2answers
64 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
50 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
103 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 ...
2
votes
1answer
44 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
41 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
34 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
40 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
42 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
55 views

jQuery Plugin - Sliding Tile Puzzle

I created a basic jQuery plugin to make a basic sliding tile puzzle. ...
1
vote
1answer
36 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
29 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
57 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 ...
2
votes
1answer
81 views

Angular directive to toggle sidebar visibility based on window width

I changed the normal way of using Angular. I'm using my controllers just to talk to my API routes and am using directives to manipulate the data and DOM as well. I am using the object literal pattern ...
0
votes
0answers
27 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
40 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
142 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 ...
7
votes
1answer
82 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 ...
11
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
42 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
37 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
66 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
40 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
30 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
15 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
47 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 ...