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

learn more… | top users | synonyms

-1
votes
2answers
34 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
29 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
50 views

Emptying and populating an element in jQuery

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

Simple cash register function [on hold]

I finally finished this online cash register, but I feel like it's a bit messy. Is there any way to trim this down a bit? The code is complete but the if/...
2
votes
0answers
15 views

Filtered Search Plugin

I need opinions on how to improve this code example github ...
5
votes
1answer
1k views

Don't search for minors, it isn't allowed

I have a search form that doesn't require much in terms of input parameters, but the Date Of Birth is import for this particular search. I have been working on creating a way that the form can be ...
6
votes
2answers
26 views

Div circular scroll

Have one div: Here's what scrolling of this div should look like: The only way I see is to duplicate ...
0
votes
0answers
64 views

Appending JSON values to the DOM

My code below uses JSON to append images into the DOM. It works properly but I want to optimize my JavaScript to see if I can write it in fewer lines or if there are methods I can use that optimize my ...
-1
votes
0answers
15 views

Incorporating Mansory.JS in a my code [closed]

I am trying to incorporate the Mansory library in my project and I have no clue what I am doing wrong. I've tried looking at this example http://masonry.desandro.com/layout.html. And other websites ...
-3
votes
0answers
46 views

Send JSON data on HTML Form with ajax type POST [closed]

Hi am traying this code it will help me. In this code the html form field converting into json object and send it via ajax on server using type POST. ...
-3
votes
0answers
25 views

How to create a simple slider [closed]

I have build the following carousel but when I reach the last image or from first image I want to go back I want to show the image needs to show. For example when you reach the last image when you ...
2
votes
2answers
63 views

Conditionally showing some icons

A coworker and I want to get feedback on our respective implementations of a JavaScript function. Both seem fast, but we're wondering which is better stylistically. Both functions handle what icons ...
0
votes
1answer
22 views

Scroll with multiple, and going different directions

I have a large image of an L-shaped painting on one page. I created divs over parts of the painting I want to explain. When the page loads, I want it to scroll down the length of the image, and then ...
2
votes
0answers
29 views

Manipulating drop-down based on data

I like to create scripts that are clear as to what they do, I like comment, and use data- * in HTML to define what each component is. I created a script that ...
2
votes
0answers
27 views

User Registration Form Layout

I am working on a site where I need to be able to accommodate frequent flyers but I am not so good at user interface design when I am given such a long leash. I am using ASP.NET (I am restricted by ...
4
votes
1answer
107 views

Iterate JSON GIF collection array to HTML file

I've written a piece of code which utilizes a for loop to iterate this array in JavaScript. This is my first attempt and I wonder if there is an optimal way to do ...
6
votes
2answers
73 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 ...
2
votes
1answer
35 views

Putting 3 different on click functions into one reusable function

I have image slider with thumbnails, simple one where I account for left and right arrow clicks that show respective images and thumbnail clicks that load related image. Functions have a lot in common ...
3
votes
1answer
61 views

Create a pop-up class

I'm new to OOP, so I tried to learn from tutorials how to create a class in JavaScript/jQuery. But tutorials don't give you feedback from experienced coders. Is the approach to create a pop-up OK (see ...
3
votes
1answer
22 views

Getting currency data out of an array

I have a button dropdown that you can select different currencies from. When you select one, it replaces the button value with that currency type, and displays the currency symbol in a span in front ...
4
votes
0answers
53 views

Ajax call to update fields on the HTML page, populate the dropdown-menu, table, and piechart

The purpose of this file is to make an Ajax call to a certain endpoint, and update a certain fields on the HTML page, auto populate the dropdown-menu, table, and piechart. My script will turn this: ...
-3
votes
1answer
62 views

jQuery Addition Calculator

Please ignore row "B. and C." as it works in the environment where it was implemented and is missing the JavaScript reference. The rows highlighted in light blue are the issue. I injected row "A." ...
2
votes
1answer
27 views

Bootstrap dynamic dropdown items

I'm trying to create a function for a dynamic dropdown. I have done it this way and it works, but I want to make my code cleaner. ...
5
votes
1answer
67 views

Nested SQLite transactions in jQuery

I'm using Cordova with jQuery and jQuery Mobile to develop a hybrid app. In this app I need to save data that I get from a server. The data is a ...
2
votes
2answers
42 views

Combining data from two AJAX requests

I have two jQuery Ajax callbacks in succession, to fetch two sets of data from two different URLs, before combining them. ...
1
vote
2answers
54 views

Populating lists with links from arrays

I have the following configuration: ...
3
votes
2answers
115 views

JavaScript form validation

Is this a "good" method of form validation? ...
4
votes
1answer
60 views

Check field values against a preset object

I want to check some fields values in a form against an existing object's values. If the values match, change a class value (it will add a sign). The following code is working, but I would like to ...
0
votes
2answers
45 views

Two groups of Buttons but with same class name

I have two groups of two buttons (status). If you click on "Complete" or "On Hold", it will change the background color of the button. I am using same class name for all the buttons but each group of ...
3
votes
1answer
72 views

One-time secret message application using PHP-encryption library

By utilizing an existing PHP encryption library (defuse/php-encryption) and a flat file database library (jamesmoss/flywheel), my application take a secret message from a user, encrypts it using a key ...
5
votes
2answers
137 views

Start of a responsive website for a legal firm

Please have a look at the HTML/CSS/JS (there is very little JS at the moment) and give me some feedback as to how my code looks to you, what level of skills it looks like I have and how I can improve. ...
4
votes
3answers
133 views

Moving items around in a queue

What I'm trying to achieve here is sort queue of .item-dragable between different lists. Users can click on right and left arrows and items move in queue ...
2
votes
1answer
41 views

Making text field taggable

I'm new to JavaScript and new to jQuery plugin development. My plugin is really easy I just want to taggify a <ul> ...
2
votes
1answer
98 views

JavaScript code for countdown function is maxing CPU usage

I have a script for a countdown function, which is using massive amounts of CPU power on my MBP. The script updates the countdown display every second and is updating all piecharts as well. ...
0
votes
0answers
25 views

Slideshow by array using slice method

I made a slide show using array values, it works, but I strongly believe that the way I did is too long. There should be an easier or more compact way to achieve this. ...
3
votes
2answers
117 views

Use presets to change a form

I intend to populate some fields in a form based on some presets values. The user choose the presets from a list. The following code is working, but as I'm a newbie, I would like to know if I done it ...
10
votes
2answers
526 views

Checking all checkboxes

Problems: Wanting to check all checkboxes when the checkbox w/id=checkall is checked. Wanting to uncheck the "checkall" box when any other checkbox is unchecked. Solution: ...
1
vote
1answer
53 views

Scroll to specific sections

I have a jQuery code that helps me to scroll to specific sections on mouse scroll. To handle mouse scroll events I am using the jQuery mousewheel plugin. ...
3
votes
2answers
102 views

Showing and hiding text excerpts

Below is my jQuery scriptfile, all the functionality works (except for the click events on IE). I bring this before you guys to ensure I am effectively separating concerns and writing efficient ...
2
votes
2answers
91 views

jQuery range slider change text based on hidden field value

I am working on a jQuery ratings function that uses the Foundation range slider. My current implementation works correctly on 2 of 7 of my range sliders. However, I am quickly realising that my ...
3
votes
1answer
66 views

Single button use to create light box that brings up different content based on the div

My goal is: when you click on the button "word" it will turn into a lightbox. The button will bring up another content box that holds the same profile image as before with a small bio with image ...
2
votes
2answers
53 views

Displaying an overlay when hovering over photos

I have some very illogical jQuery code and I want to see if someone finds a better way to do the exact same thing: jQuery: ...
3
votes
0answers
74 views

JavaScript API for REST

I have a REST API, which naturally you can just use HTTP calls (mainly Ajax) in order to send and receive data. I am building a layer of abstraction on top of the raw REST API for JavaScript ...
0
votes
0answers
26 views

Custom post carousel

I created a post carousel (it's being used on a WordPress theme initially), but I've adapted it to just HTML/CSS/JS one. CodePen ...
3
votes
2answers
66 views

Banner Picker in jQuery

I would like to know if my current jQuery code could be improved? If yes, can you give me improvements? ...
3
votes
1answer
52 views

Converting Procedural JS Code to Object

I'm new to JS and trying to improve my code with the use of more organised objects. I have the following procedural code which I have converted to an object. It does an ajax load within main. Aside ...
2
votes
0answers
35 views

Filter CSV file and display it using Highcharts

I created a function which reads CSV file and displays those values in a graphical form using Highcharts. Although it works, I have to read the CSV file twice because first: I need to get all the ...
1
vote
0answers
105 views

jQuery plugin for dynamically sticky headers and footers

I am creating a jQuery plugin to be used to stick the headers and footers of tables (or other list data) to the top and bottom of the viewport while scrolling. (i.e. scrolling down the page, the ...
2
votes
2answers
77 views

Selecting security questions and entering answers

I have a dialog that houses 6 security questions and 6 security question answers. I want to pass the data the user selects and enters from the view to the controller to save the data in session. ...
0
votes
1answer
159 views

Countdown timer in PHP

Using PHP and jQuery, I was able to make this countdown timer. I've searched various books and obviously on Google, but couldn't find this type of approach as used by me here. I sincerely feel there ...