a JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development.
0
votes
0answers
19 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
20 views
Custom backend app
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
12 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
18 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
21 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
30 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
25 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
54 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
40 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
29 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
63 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
23 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
25 views
3
votes
1answer
23 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
46 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
34 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
68 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
42 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
48 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
26 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
32 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
47 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
87 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
50 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
36 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
16 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
46 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
27 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
30 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
39 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
28 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
201 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 ...
5
votes
1answer
99 views
Unit testing a click event with asynchronous content
I'm writing unit tests for a web application that has quite a lot of UI interactions. I would like some feedback regarding on how to handle click events with asynchronous code.
My goal here is to ...
2
votes
0answers
52 views
Clearing the text when `text select` release
I required a trigger, whenever the window text selection cleared.
Finally I found this approach.
Using the same id, I have ...
5
votes
1answer
69 views
App for painting images
I am a newcomer to jQuery and am working on an app that allows the user to paint images. To do that, I've created a color palette, and if a user clicks on a color, the paint brush successfully changes ...
3
votes
1answer
137 views
Portfolio landing page
I'm trying to grasp this whole MVC design pattern idea but I'm in the dark if I'm doing it correct. This is where I need some feedback on what I've done so far. Here's what I'm wondering:
Does the ...
2
votes
2answers
148 views
Animation that cycles through background colors
I am doing a background image animation using the function. It works, but I think I am doing more coding than what it requires. Can anyone please help me to minimize it?
Don't recommend the CSS ...
2
votes
0answers
26 views
Bootstrap Tabs With SammyJs
Is there a better way to implement bootstrap tabs routing with SammyJS besides this?
...
4
votes
1answer
61 views
How should I name a function which shows or hides 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.
How should I replace the term ...
2
votes
0answers
110 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 ...
2
votes
1answer
55 views
AJAX call with repetitive success/failure handlers
There's some repetition in here. I tried making it into a function but then the response wasn't filling up the ...