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
25 views

How should I name a function which show or hide an element?

I have a function to display or hide some elements. What I want to do is to manage the display of those elements regarding a value. Here is a sample: ...
2
votes
0answers
39 views

Simple yet incredible parallax scrolling effect

I wanted to learn how to create awesome parallax scrolling effects so I decided to look up how to do it, after some searching I put together this test. It works fine to some extent but it feels a bit ...
3
votes
2answers
78 views

Applying an id attribute based on a variable's value

I have the following code that checks the value of a variable and then applies the correct id attribute accordingly. The value of ...
0
votes
1answer
26 views

Toggling buttons within a div

This code is used to toggle buttons within a div: ...
1
vote
0answers
24 views
-1
votes
0answers
16 views

Use something other than a modulo for this function [on hold]

I'm wondering if there is another way to write this function without using a modulo to determine how many times a user has clicked and base it off that. It's interfering with another piece of code I ...
0
votes
1answer
93 views
0
votes
0answers
34 views

Super simple jQuery slider

I created the most simple though still quite flexible jQuery slider ever! Or at least, I hope so. ...
4
votes
1answer
45 views

Removing popup notification, the dirty way

I'm new to coding and I am self-taught up to this point, so my scope for creativity is quite limited. As such I'm doing something in particular that I suspect isn't the "best" way of achieving this ...
1
vote
1answer
50 views

Test & remove, or always remove [on hold]

I have a simple function in jQuery I'm using for an event to show a tool tip that may fire a LOT (based on mouse movements): Code A: ...
0
votes
0answers
10 views

MVC One Page Application Architecture [closed]

I am looking to see if the way I am going about developing my business applications follows best practices. I am not sure if the way I am going about this is the proper way or if there are even ...
0
votes
2answers
45 views

Recurring dates auto selection using jQuery UI multiDatesPicker

I setup my code at jsfiddle. Along the review I want to know the solution of a problem I'm facing in this code. On click the Edit button I want to enable the calendar which is disabled by default. ...
4
votes
1answer
112 views

Extend jQuery with enable/disable function

I want to create an extended disable/enable function in jQuery. This is working, but is this the best solution? Is each loop necessary? ...
0
votes
1answer
30 views

Output JavaScript object into HTML table of key-value pairs using jQuery

This function is meant to take an object, loop through the key-values and generate/build a HTML table at a particular ID: ...
1
vote
2answers
67 views

jQuery addClass

I am a self confessed jQuery novice but I am conscious of learning the correct techniques. When I can see repetition like this I just know that there must be a better way. jsFiddle ...
1
vote
1answer
39 views

Repetitive event handler for a toggling UI control

I feel like this bit of code could have been written more elegantly, especially with the huge if/else statements. Can somebody help me break this down? It would really help me out in the future. ...
1
vote
4answers
73 views

Shorter code for adding checkboxes

How can I make this code shorter? ...
5
votes
1answer
44 views

Kendo grid optimization

I have two kendoGrid(s) named: ...
3
votes
2answers
80 views

iPhone notes application replica using HTML/CSS

I've written a web application that is a replica of the iPhone's notes app. It turned out quite well, you can do everything you can on the iPhone's app except for sharing and sending it via texts etc. ...
4
votes
1answer
71 views

PHP & AJAX live chat - alternative ways

I am trying to implement a live chat for my websites visitors. Currently I am using the code that you can see below - a PHP script that processes in background and that is called by AJAX. I am not ...
1
vote
0answers
52 views

Custom bootstrap plugin extending popover with ZeroClipboard integration

I'm trying to create bootstrap plugin that will be used for copying content to clipboard. I managed to build working version of my plugin but I'm wondering how I can improve it. Idea is to show a ...
0
votes
0answers
29 views

Dynamically display relevant form elements

Here is a group of questions (hidden by default except the first one) with yes|no buttons ...
2
votes
1answer
53 views

Adding HTML DOM template

I'm new to JS and jQuery. I wrote this function which just does what I want, but it seems very unreadable, and because of my experience, I don't know a better way to handle it. Could you please give ...
0
votes
2answers
74 views

Hide and show menu if button clicked and change the icon

I wrote simple jQuery code and I want suggestions as to how I can do it better and shorter. Basically the following code is used to change the menu icon on each click event and also hide and display ...
3
votes
2answers
118 views

Elevator program code challenge

I recently applied for a job where the company gave me the following prompt for a code challenge. They have since told me "yeah, no thanks" but provided me with no feedback about why they came to that ...
3
votes
1answer
77 views

jQuery on-change using multiple selectors

What is the best way to refactor the following code to avoid duplication? ...
2
votes
2answers
42 views

addClass and removeClass in a switch case

Since I'm still learning jQuery, I would like to have some feedback on my code: ...
0
votes
0answers
52 views

Object-oriented JavaScript quiz

I have a quiz app that I wrote with ASP.NET MVC and jQuery, but in an effort to restructure the jQuery code, ended up with the code below: ...
0
votes
0answers
47 views

Transferring file from Google to Parse.com

I have created a system where user selects files from their Google drive to be uploaded into Parse. I have done so separately though, where I have one code that allows user to select an item from ...
1
vote
0answers
37 views

Load different table contents from mySql database using AJAX and display them

I've written a small application as a part of a much bigger project. This script grabs a bunch of tables from a MySQL database and displays them. The table that is being grabbed and displayed depends ...
10
votes
2answers
156 views

jQuery AJAX form using bad practice

I have not worked with jQuery for years so my knowledge of it is extremely limited. I wrote the following form and received a comment elsewhere saying: This is some of the worst JavaScript I've ...
0
votes
0answers
17 views

Triggering approach for an input box

I am setting a value to input box and trigger to hear the change. I would also like to always hear the input change, and for that I made this function. Can any expert please verify the way I did is ...
2
votes
3answers
94 views

Playing with colours

I was hoping people could help me review the following page that I've been working on. The page has a simple form that looks at a list of colours and draw a few divs with those colours as backgrounds ...
1
vote
0answers
30 views

Handling pagination on a particular page

I have a Java script that handles pagination on a particular page by using a jQuery pagination plugin. Is there any way to improve the code? ...
5
votes
2answers
94 views

Hide or show if radio button is checked

I was recently working on a project, something jQuery-related for WP-Admin area. I enable post-formats and create metaboxes for these post-formats, so at the end I tried to hide these metaboxes until ...
2
votes
1answer
44 views

Condensing multiple conditionals into function

I feel like I'm repeating a ton of code here and there's got to be a better way to do this but am just completely spacing right now. I basically have an else if ...
3
votes
5answers
116 views

Writing a checkbox with jQuery

If a checkbox is clicked, it will be added to the total, if not, it will be deducted or ignored. (The total number of checkboxes I have in real is 25.) Is there a way to write the code below in a ...
6
votes
1answer
95 views

JavaScript “snow” code

I have worked for a few hours and this is the result: ...
2
votes
0answers
61 views

Programming with PHP & jQuery

I'm programming a system and I want to know if this is the correct way or if there are a better way to do it. Container: I have more fields but I only added one to show you the container. ...
1
vote
1answer
26 views

Appending URL parameters to links

I've got some pages that may or may not load with a ReturnUrl parameter, and some links that will be generated without that parameter (though I've applied a class to them). The site uses jQuery, and ...
5
votes
0answers
58 views

Smoother column resize, page reveal animation

I've been working on this site. The designers original inspiration for the column layout came from this site. I've been trying to get the animation as smooth as possible, to match the smoothness of ...
6
votes
1answer
49 views

Note taking app (saves notes to an array)

I created the following app (only saves the notes in an array so no a proper note taking app). I would like to know how I would make this code more object orientated. JSFiddle script.js: ...
2
votes
0answers
24 views

Pluggin' in a Plugin [closed]

Can anyone tell me if I'm correctly binding an event inside my jQuery plugin? If not, what's the best way to achieve that? Here is my plugin code: ...
5
votes
1answer
57 views

Multi-level image slider

Here is my code I'm working with: ...
1
vote
0answers
26 views

CPU friendly infinite text scroller - velocity

I've done some research today and read a lot about JavaScript performance. I learned that animating using the transform: translate makes a use of the GPU, hence ...
3
votes
2answers
73 views

Speed up loop through JSON

I have the following function that takes JSON and turns it into table rows: ...
4
votes
1answer
84 views

jQuery scroll-prevention plugin

This plugin is for article pages that has a very long main content (left side) and a shorter sidebar. When the user scrolls down mostly the right part will be white space. What this plugin does is ...
3
votes
1answer
41 views

Loading and displaying JSON quickly in PhoneGap app

I have this tap event in an iOS app that I'm developing with PhoneGap. When I click on the left arrow, it finds the desired content and retrieves it from a JSON file. It then displays those results on ...
1
vote
1answer
69 views

Visual increment and decrement button controls in jQuery

I currently have a working implementation of a + and - tank level thingy (I don't really know what to call it). In which will be able to 'add' or 'remove' so-called 'liquid' from the container. ...
3
votes
1answer
76 views

Cleaning up website code

I am a bit of noob to jQuery so I got this jQuery code what I think can be way faster. Does someone want to help me clean it up? Explaining why you did what would be real nice but not needed. The ...