a JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development.
5
votes
1answer
68 views
An utterly pointless jQuery program
This is the first jQuery program I've written, and it doesn't do much, but I'd appreciate the feedback. Just click on the different colored buttons to do things.
Codepen
...
1
vote
0answers
11 views
jquery .load() div content from URL with hash-sign for id [on hold]
I have my page so far: einserpasch.com
The crucial markup is this:
...
2
votes
0answers
32 views
0
votes
0answers
13 views
Trying to print entire Kendo grid(with paging) at once. Trigger Print function(print only div) only after previous function has executed [on hold]
This is my First method which sets the page Size dynamically and takes data from a server. So takes a bit of time.
...
3
votes
1answer
59 views
Hide and show columns in an HTML table
Codepen Link
I've tried to Google, but there's no library that has an API to toggle table columns when clicked elsewhere on the page, so I've decided to do this:
...
1
vote
1answer
27 views
Return fake jqXHR from custom Ajax method
I have several methods that wrap the $.ajax() method and return its jqXHR, but I need to force fail before even calling the original ...
0
votes
4answers
37 views
Account disabled and deleted functions
I have the following functions that for the most part are utilizing much of the same code (except for the actual message). What are the possibilities, if there are any, for combining / reducing these ...
-5
votes
0answers
15 views
What's the most efficient algorithm for a slider (using jQuery)? [closed]
I want to build a slider which displays 3 images when the middle image gets a bigger sized thank the others.
There is no limit for how many images could be in the slider.
I have two ideas of how ...
0
votes
0answers
12 views
Making my CSS effects work in Jquery function [closed]
I wanna apply jQuery effect on my website, when you hover over title that it will fade - half opacity and my list hidden list menu will appear.
The code seems to work but not together. Thanks for ...
1
vote
1answer
39 views
Rewriting this function to use `promises` instead of `async: false`
Using parse.com's javascript API, I would like to get a variable number or images from img tags on a page and save those images in the currently logged in user's ...
1
vote
0answers
15 views
Form valid combinations from CSV selection options
I am building a form with multiple select option fields. I am trying to only show the next field if it exists as a combination in the CSV file I am reading in. It's working fine right now and I am ...
0
votes
0answers
22 views
Make knockoutjs model simpler and avoid full observable array refresh
The form creates / updates /deletes a category. The category is simple: ID and name properties in backend (Laravel) model.
UI:
Clicking on a category enables "edit mode":
I need 2 things here:
...
0
votes
1answer
16 views
Shorter way to add click handler to multiple IDs?
So i'm kinda new at this jQuery stuff and i've gathered up this much to make my code functional, but i would really want to shorten it. I've already tried $('#Monday','#Tuesday'....) to group them, ...
1
vote
1answer
55 views
Setting combined height and width viewport “breakpoints”
I'm using JavaScript to handle breakpoints in a single page, non-scrollable application. I want to do various things when changing viewports, such as fire off animations with a JavaScript animation ...
0
votes
0answers
21 views
Javascript pagination plugin
I'm working in an application where there's a long unordered list of items that have to be paginated. New items are added to the list regularly, and the items come from a database.
The only control I ...
1
vote
1answer
51 views
Caching DOM-queries
I've been optimizing my code and I always tend to cache common selectors like this (jQ):
...
1
vote
1answer
91 views
Interactive search filter for HTML table
I know there are many great plugins on the Net nowadays. But due to safety issues, external plugin are restricted. Thus, I wrote some JavaScript for an interactively searchable HTML table. The main ...
1
vote
1answer
38 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
57 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
12 views
Autocompleting when a certain class is present
This jQuery actually autocomplete when the onkeydown class is present and load the autocomplete with corresponding variable. This is working but I want to make it ...
0
votes
1answer
48 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
94 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
2answers
76 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
30 views
0
votes
1answer
48 views
0
votes
0answers
23 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
32 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
29 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
23 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
27 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
46 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
39 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
57 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 ...
4
votes
0answers
65 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
1answer
48 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 ...
-3
votes
1answer
39 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
71 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
38 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
30 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
33 views
3
votes
1answer
25 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
76 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
52 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
59 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
53 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
37 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
61 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 ...