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

Restructure code to avoid using async false

I have the following code that works perfectly other than the fact that it has to use async false, to wait for a response from ajax. Is there a way of restructuring this by using callbacks, or ...
5
votes
1answer
43 views

Script to upload CV with cookie control

I have created a script which presents a popup on every 5th pageview. I would like to try to use just PHP cookies. However, due to the requirement of setting them before any content is output, it ...
0
votes
0answers
22 views

Skidding car animation [on hold]

How I can do a better calc on this lines: ...
0
votes
0answers
7 views

popup pictures in a Front end javascript website [on hold]

I am looking for some help to solve a problem that I am having... I am playing around with a template I found online and I am trying to use another JavaScript script on the template to change the ...
0
votes
0answers
14 views

Multiple custom file input fields with jQuery

I've modified this example to better suit my needs in handling multiple custom file uploads on the same page. It also renders the filename or truncates if it is too long for each of the 3 file fields. ...
1
vote
1answer
61 views

Add multiple data attributes to elements using jQuery

I'm looking for some help on how I can optimize adding multiple data attribute tags to elements, and really, any feedback at all. Background Client uses a analytics tool through a tag management ...
2
votes
1answer
56 views

Generating a random number of progress bars

I have this JSFiddle that generates a random number of progress bars then assigns a random number and percent to them. I am wondering if you know how to better optimize this code to have better ...
1
vote
0answers
17 views

Bootstrap Data Table generation

I am generating a searchable and sortable data table using ...
0
votes
1answer
28 views

Handling data from an HTML table using jQuery

I have the following table: ...
0
votes
0answers
22 views

Search box in JavaScript for blogger.com

I wanted to build a search box for Blogspot which goes through every label and filters them so remains just the match and every other label is hidden. I work with this through the firefox developer ...
2
votes
0answers
30 views

Custom backend app with require.js approach

I'm working on a small custom backend app in PHP for personal use (and practice MVC) and I thought it was a nice opportunity to try (and learn) requirejs to 'organize' my scripts and load just what ...
1
vote
0answers
17 views

jQuery UI tabs: navigation thru tabs using active options

I am using jQuery UI Tabs for a web application and I would like to navigate thru different tabs with these four buttons: next-tab: takes you to the next tab prev-tab: takes you to the previous tab ...
2
votes
1answer
22 views

Refactor two jQuery filter functions into one function

I have two separate lists both sitting side by side. How can I refactor the code below to only have one filter function for both lists? ...
1
vote
0answers
25 views

Improving JavaScript processing of Ruby Regex

I have a basic webapp that basically serves the same purpose as Rubular.com, but for gsub. It runs some simple JavaScript, which POST's to a Sinatra app, which then updates page with the results. ...
2
votes
0answers
34 views

Drawing tarot cards

The goal is to draw random tarot cards from the suit, number of cards is determined by the amount of HTML elements with 'card-container' class on given page. The deck is structured as follows: ...
3
votes
2answers
30 views

Star rating: Update stars on click and don't lose the actual vote on re-hover

I'm trying to make a star based rating system. First of all, I don't like to make it all with JS and only inner html the rated stars in a given div. I want to make it more like a plugin with the ...
2
votes
1answer
56 views

Getting duration between two dates

I'm developing on a web application where I have a start and a finish date and time and have to set the duration between it. There are inputs for dates and times. Then, I have this function which ...
3
votes
0answers
47 views

Google material ripple button effect

I have "translated" this example built with jQuery in vanilla JavaScript, but I'd like to know if there are better ways to do it. The jQuery version uses offset() ...
1
vote
0answers
24 views

Web Audio Oscillator Waveform

I'm currently working with Web Audio for creating a simple synth like project in the browser and implementing controls for the Oscillators via jQuery/jQueryUI: ...
0
votes
0answers
32 views

Passing an array in a hyperlink

Maybe this is fine the way it is, but it seems messy. Basically I have dynamically generated HTML that will display a list of songs in a given folder. Each song has an ID, and I want to add a button ...
-2
votes
1answer
38 views

How to do the same thing for many objects

I use the following code and I want instead to repeat it over and over again to write it in short/better way,is it possible in JS? ...
3
votes
1answer
66 views

Checking checkboxes

I wrote this code for checking checkboxes. There are two groups of checkbox: each group's checkboxes have one common class all_perks and one individual class ...
2
votes
0answers
26 views

Parallax multibrowser jQuery plugin

I'm working on website with a parallax effect. The jQuery code is working, but I wonder if there could be made any improvements made to the code. At the moment it works totally smooth in Firefox, but ...
5
votes
1answer
29 views

Binding events in constructor

I am trying to get familiar with OOP JavaScript, in particular working with the prototype pattern and would love some pointers/suggestions on how to improve my code. I think I have understood the ...
2
votes
2answers
28 views
3
votes
1answer
24 views

Showing information about states on a map when clicked

I'm using JQVMap, and I have my code to where depending on what state you click, it'll reveal info about that state within a single div below the map. However, I feel there's a simplified, more ...
3
votes
0answers
60 views

Efficient JavaScript/jQuery typewriter effect that handles HTML5, entities, and text

How should this code be improved? For instance: How could it be shorter, clearer, deal with memory better, use a plugin/library, better prepared for web input? I can break up and clarify the regex ...
3
votes
1answer
38 views

Toolbar using jQuery

I am a beginner in JavaScript and starting to understand jQuery. I've written a toolbar that uses jQuery. I've also put comments based on what I understand of how the code works, though through the ...
1
vote
3answers
70 views

Checking and displaying JSON data

I mainly develop in PHP and every now and again I have to do stuff in JavaScript which I'm not really comfortable, so I would like a review of how I can improve my code and knowledge. This script ...
4
votes
3answers
48 views

Changing the background color when a link is clicked

What I'm trying to do is to change the background color when a link is clicked (in this case a list item). When it is no longer clicked, it should revert back to its normal color. I was able to get ...
3
votes
1answer
51 views

correctGuess() and incorrectGuess() functions for a quiz

In my JavaScript quiz, I have two functions below which are not DRY. What i want to do is to cut it, so everything below var = text would be used only once not ...
2
votes
1answer
30 views

Summing 3 jQuery modal dialog functions

I am getting better with jquery day by day, but there are still things I don't know how to sum up several functions to reduce some code. So I am using three jquery modal dialog popups and I have ...
2
votes
0answers
34 views

Create one function instead of two bootstrap modal

I have a form that reads a JSON file for default wrong answers to be applied to a 'summary div' at the end of the form. I wondered if I could make these two functions one somehow? It is a bootstrap ...
0
votes
0answers
50 views

Change color of link if radio button is not checked

I have created an online exam system in PHP and JavaScript. In the HTML page, my questions are fetched from the database. If any question is unanswered or the radio button is unchecked, then the ...
3
votes
2answers
89 views

Is my login system secure?

I am recently making a CMS and I need a secure login system, so this is my code. How is it? First: the HTMLcode for signup and login: ...
1
vote
2answers
51 views

Alternate for nested Ajax requests

I have one button on clicking I need multiple things need to be done, so I went for AJAX and PHP: ...
0
votes
1answer
14 views

Creating object Nodes an easier way

I am required to create a bunch of object nodes to an object: ...
2
votes
1answer
61 views

Changing background colour

I am currently changing the background colour of a sidebar each time a menu item is clicked using the following code: ...
3
votes
1answer
37 views

JavaScript/jQuery DatePicker

I created some functionality for JavaScript datepicker. I'm trying to store a value in the datepicker with the selected month along with which half it is. To do ...
0
votes
0answers
17 views

jQuery cookie scroll position

I'm using jquery and cookie.jquery to remember the scroll position. Is there anything I can do to improve my code? Thanks! ...
2
votes
0answers
50 views

HTML5/CSS live Validation w/jQuery

I've been working on a live form validation project, initially I intended on finding a way to solely use CSS for said validation but it quickly became apparent I would require some jQuery to get it to ...
1
vote
0answers
28 views

jQuery remote validation plugin

I wrote this jquery plugin to do remote validations on the server. The code self explanatory. When the field blurs (event is customisable), the plugin checks to see if there is a value and sends the ...
0
votes
0answers
14 views

Code enhancement for existing npm package

I am trying to improve the code in the npm package. I have looked through the code but don't have any ideas how to write proper code. GitHub ...
-1
votes
0answers
16 views

Optimize Javascript with JQuery code

I have this form where if you enter the customer number the alternate ID is disabled and visa-versa when I submit a bad form via Ajax. When the response comes back both fields are able to be edited. ...
1
vote
1answer
31 views

Updating height of the rows in tables with jQuery

Does it make any sense and how to modify the JavaScript/jQuery code below to increase the performance? The working code is: ...
2
votes
0answers
40 views

Creating chat box with comet

I'm writing chat application. I would like to know if there are problems in this code. This function sends message: ...
1
vote
1answer
30 views

Making a scroll function more efficient in jQuery

I have the following code, though I'm not sure it is efficient as it could be. ...
1
vote
1answer
36 views

MVC + Events in JavaScript

I'm a bit lost with implementing MCV pattern on javascript. Where should events (such as 'click','change') come in on MVC in javascript? I have this event function, ...
0
votes
0answers
203 views

jQuery Scroll to ID on Next Page Loading and Back to Top Anchor

I'm no jQuery fundi and I kinda hacked this together, it does work. I just want to know if there's a better smoother more code compliant way of doing it? ...
2
votes
1answer
26 views

geoInput jQuery Plugin

I made my first jQuery plugin, and was hoping to get a review. I'm especially interested in comments on whether I went about building up my html and applying the css in a reasonable manner (I chose to ...