The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [jquery]

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

Filter by
Sorted by
Tagged with
11
votes
4answers
64k views

Different way of writing multiple click functions

I have the following .click() functions: ...
12
votes
1answer
1k views

Responsive/adaptive website code

I have all these functions that work together to create functionality on a page. Is the structure of these functions OK? Can I do anything to speed this up or make my code better? I'm not exactly ...
10
votes
2answers
683 views

In-browser syntax highlighter

I've made a simple in-browser syntax highlighter using JQuery. It's pretty simple, it just wraps keywords, integers, and such in <span> elements with color ...
1
vote
1answer
359 views

Adding, deleting elements as per autocomplete results

I am working on a bookmarker project for replacing storage of bookmarks in a web browser. It will be storing bookmarks as per categories in a database. I have written some jQuery for the WIP search ...
1
vote
1answer
205 views

Comment List using ReactJS

Looking for some ideas as to how to improve the below react component. ...
2
votes
1answer
104 views

Adding, deleting elements as per autocomplete results - updated

I am working on a Python/Django project which has turned into a JavaScript/jQuery project due to the amount of asynchronous functionality that I thought to add. There is a JavaScript file which is ...
23
votes
1answer
36k views

Handling Hover Events on a Touch Screen

A website I have designed uses a nav menu that shows submenus on :hover. The initial site did not use any responsive design: it targeted only the desktop ...
38
votes
8answers
17k views

Rendering a person's time clock record in HTML, with many color-coded conditions

I have coded this mess of JavaScript and a bit of jQuery. Everything here works perfect as intended, however it is a real mess. What would be the best way to clean this up with best practices and ...
10
votes
1answer
1k views

JavaScript “snow” animation

I have worked for a few hours and this is the result: ...
4
votes
2answers
644 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
8k views

Wrapper for jquery ajax to ensure redirects occur on clientside

Recently I had the need to make some ajax calls within a MVC 3.0 with Razor and jQuery application. After a bit of trial and error and refactoring it was discovered that a number of different needs ...
24
votes
9answers
36k views

Set of jQuery .onclick functions

I am hiding and fading in different content on the same page using jQuery to hide() and fadeIn() the content depending on which ...
10
votes
2answers
1k views

Tool for automatically correcting indentation and formatting of CR & SO code

This is my tentative solution to: How can I prepare my code so that I can paste it formatted? If you need to copy and paste code into the question or answer textarea when solving someone's problem, ...
6
votes
1answer
2k views

Plugin that conditionally displays elements based on form values

I've just released a jQuery plugin that conditionally displays elements based on form values. I would appreciate any suggestions on how to improve both the code and its usefulness. Here's the demo ...
2
votes
0answers
54 views

Performance of a jQuery module

Following this question, I've rewritten my module as follows: ...
11
votes
4answers
2k views

Gallery of employees with dynamic filtering

I'm trying to learn how to write better, more efficient JavaScript code and wanted to run this function I'd written by you and see if people can suggest an improved method. It's basically a people ...
9
votes
2answers
136 views

Script to convert Shift + Spacebar into four spaces on SE - Second Improvement

Secondary Review Changes: I recently requested a review: Script to convert Shift + Spacebar into four spaces on SE. After accepting suggestions and improvements by David Harkness, I heavily updated ...
5
votes
1answer
1k views

JS Progress Bar Widget

Demo of the widget: http://jsfiddle.net/slicedtoad/Lywvbsf4/ It's a progress bar that shows a list of steps and which one is being completed as well as allowing previous steps to be revisited. It ...
5
votes
2answers
1k views

Handling multiple click events of sliding divs

You are first confronted by three links. Each link triggers divs to slide out. The divs slide out and up to appear as if unfolding. The slide back in reverse when any other link on the page is ...
4
votes
1answer
440 views

Personal project for managing my bookmarks

I am working on a personal project for managing my bookmarks, which is basically a web page to manage my bookmarks by categories. Managing here means everything - adding, viewing, updating, searching ...
4
votes
1answer
265 views

CSS3 Dropdown Menu (touch device or mouse compatible)

This may be rather basic, but I wanted to experiment and learn with some of the upcoming CSS3 techniques. I wasn't able to come up with an HTML/CSS only solution, and I had to work longer than I'd ...
3
votes
1answer
65 views

Set up event on class and initialize state [closed]

Very similar to this question, I'm curious about common patterns/best practices for handling events in coffeescript classes, particularly when you also need to call the event handlers immediately to ...
2
votes
1answer
242 views

Truncate text to some number of words when clicked

I am currently using the code below to truncate text: ...
2
votes
2answers
112 views

jQuery Tab Scroller

I've never had anyone review my code. I actually found full-time work as a web developer and in the interest of ensuring that I'm always improving, I'd like to see if I'm doing things the proper way. ...
2
votes
1answer
57 views

Add colour tags on click

I have implemented some extra functionality for the tag-it JavaScript plugin, where I need an option where availableTags are displayed in one box, and the user can ...
2
votes
1answer
7k views

jQuery function to link nested checkboxes

...
1
vote
1answer
129 views

Upload and drag the image inside a mask image

I am allowing users to upload and drag images with this code. Give me a review of this. Codepen ...
1
vote
1answer
2k views

jQuery Widget - Progress Tracker

This is a follow up on JS Progress Bar Widget I've rewritten it as a jQuery Widget Factory widget, attempting to follow that standard as much possible and fixing the various problems pointed out in ...
0
votes
1answer
78 views

Combining hover functions

I have many <spans>s which need to group to change opacity after hover. All of them need to have unique IDs. Is there a way to combine all these hover ...
11
votes
3answers
4k views

Ultimate Tic-Tac-Toe Challenge

This is my attempt at the Ultimate Tic-Tac-Toe code challenge. It uses jQuery to build out the game grid and find the states of all the "buttons" (actually ...
10
votes
2answers
168 views

Member list reveals member information on click (#1)

What I'm doing? I'm creating a member-list where initially only the names are visible. Clicking the names reveals the member information. This is done with jQuery by adding/removing classes. I left ...
8
votes
3answers
2k views

jQuery Upvote, a simple Stack Exchange style voting plugin

I'm not very good at JavaScript, so it would be great if somebody could review my jQuery Upvote plugin, and point out mistakes, bad practices, or anything suspicious. The repository is on GitHub. ...
6
votes
1answer
2k views

Navigation bar built from fetched JSON data

I have finally been able to create my little navigation plugin in an object-oriented way that reads the li from a JSON file. Now, is my code efficient? Especially, ...
6
votes
2answers
236 views

Simplifying this form validation script

Can anyone please help me to simplify this form validation script? It works great but I was just wondering if I can get some help to make it simpler. Your opinion on the approach I used below is ...
6
votes
1answer
303 views

Phishing application God class

This project is ultimately my senior thesis to graduate from college. It will end up being very long with several code reviews and redesigns. The next rubberduck perhaps? I've been working on a ...
6
votes
2answers
2k views

Zip Code to City, State for registration form

Took me a couple of days (in between working on other projects) to get the code working, but now that I do have it working I would like to know if there is a way that I could make it work better, or ...
6
votes
2answers
105 views

Loop through string array with exit if test passed

I need to return True if a page contains any of a list of element types. This code works. ...
6
votes
2answers
644 views

Retirement Calculator

I created a program that determines how many years you have left before retiring, and in a year when you can retire. This is my code below: ...
5
votes
1answer
223 views

Transforming jQuery form code into clean code

The following JS code handles when the form is submitted and some little extra stuff. I'd like to have it reviewed on the following aspects: Readability Efficiency Usability OOP It works exactly as ...
4
votes
3answers
112 views

Removal of jQuery from script to auto-apply coupons from a link

We are using a small extension that auto-applies coupons from a link. The extension had pop-up JS based on jQuery: ...
4
votes
2answers
85 views

Initializing events on class

I wrote a simple class that substitutes all file inputs in an HTML for a more complex template and set some actions on it. The code is rather small, but I'm not used to write JavaScript. I wonder if ...
4
votes
1answer
388 views

Simple morphing button concept

I have been making a jQuery morphing button type thing. jsFiddle ...
3
votes
2answers
85 views

Displaying information extracted from an HTML table

This function below (used on a timeout due to my page loading time) displays information on my site. I grab this data from my table view that I load into the page. It is launched by clicking a button ...
3
votes
2answers
51 views

Sliding marker on link hover with jQuery

The following code is for a vertical menu, where I needed a marker to slide down next to a link upon hovering over said link. Therefore I needed to change CSS properties of a HTML element (the top-...
3
votes
2answers
1k views

jQuery Object Oriented Plugin [closed]

Update: Great answers up to now, but I would still love to have a bit of review about possibility of variable caching and the filter I'm using for rows and page sets! After seeing a lot of Paginator ...
3
votes
1answer
75 views

jQuery module to edit HTML elements

I need to turn a lot of html elements as editable elements. You will double click on the element to edit, press enter to validate (send a PUT to the RESTapi), press esc to undo. I've written this ...
3
votes
2answers
56 views

jQuery dynamic toggle class function

I wrote this function that will toggle a class of a targeted element. Applying the class js_class_toggle to any element will trigger the function when clicking on ...
3
votes
2answers
101 views

Converting a string to two strings

I have the following code that converts a string that looks like: aaa-bbb|ccc-ddd|eee-fff to two strings that look like: aaa|ccc|eeeandbbb|ddd|fff The code ...
3
votes
1answer
53 views

Opening & closing active items with jQuery

I'm trying to have the 3 buttons to each open its own list below whilst closing any current active lists open. I've tried my best with jQuery, but it seems so bloated. Is there a way to streamline ...
3
votes
2answers
164 views

Find number matching range

I have code that checks the range of a value and sets a variable accordingly. ...