a JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development.
2
votes
0answers
27 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 ...
-1
votes
0answers
15 views
Sticky header not showing fully [on hold]
I followed a code review snippet to implement in my website which I'm steadily building on.
I've found out how to make it stick at the bottom and on a scroll down it sticks to the top, but when it ...
0
votes
0answers
29 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
73 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
43 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
13 views
Creating object Nodes an easier way
I am required to create a bunch of object nodes to an object:
...
2
votes
1answer
54 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
28 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
14 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
37 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
21 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
13 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
25 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
34 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
25 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
168 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
90 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
63 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
132 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
147 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
25 views
Bootstrap Tabs With SammyJs
Is there a better way to implement bootstrap tabs routing with SammyJS besides this?
...
4
votes
1answer
60 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
81 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
52 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 ...
3
votes
2answers
94 views
Applying an id attribute based on a variable's value
I have the following code that checks the value of a variable and then applies the correct id attribute accordingly. The value of ...
0
votes
1answer
31 views
3
votes
1answer
177 views
0
votes
1answer
127 views
Animated bubbly font that then does something else based on input [closed]
I have written this code, but it contains a lot of repeating lines, so I thought maybe I could shorten this with switch.
It basically displays in a bubbly font ...
1
vote
1answer
97 views
Super simple jQuery slider
I created the most simple though still quite flexible jQuery slider ever! Or at least, I hope so.
...
4
votes
1answer
64 views
Removing popup notification, the dirty way
I'm new to coding and I am self-taught up to this point, so my scope for creativity is quite limited. As such I'm doing something in particular that I suspect isn't the "best" way of achieving this ...
1
vote
1answer
75 views
Test & remove, or always remove [closed]
I have a simple function in jQuery I'm using for an event to show a tool tip that may fire a LOT (based on mouse movements):
Code A:
...
1
vote
2answers
104 views
Recurring dates auto selection using jQuery UI multiDatesPicker
I setup my code at jsfiddle. Along the review I want to know the solution of a problem I'm facing in this code.
On click the Edit button I want to enable the calendar which is disabled by default. ...
4
votes
1answer
127 views
Extend jQuery with enable/disable function
I want to create an extended disable/enable function in jQuery. This is working, but is this the best solution? Is each loop necessary?
...
0
votes
1answer
47 views
Output JavaScript object into HTML table of key-value pairs using jQuery
This function is meant to take an object, loop through the key-values and generate/build a HTML table at a particular ID:
...
1
vote
2answers
83 views
jQuery addClass
I am a self confessed jQuery novice but I am conscious of learning the correct techniques. When I can see repetition like this I just know that there must be a better way.
jsFiddle
...
1
vote
1answer
44 views
Repetitive event handler for a toggling UI control
I feel like this bit of code could have been written more elegantly, especially with the huge if/else statements. Can somebody help me break this down? It would really help me out in the future.
...
1
vote
4answers
84 views
5
votes
1answer
48 views
3
votes
2answers
88 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
98 views
PHP & AJAX live chat - alternative ways
I am trying to implement a live chat for my websites visitors. Currently I am using the code that you can see below - a PHP script that processes in background and that is called by AJAX. I am not ...
1
vote
0answers
89 views
Custom bootstrap plugin extending popover with ZeroClipboard integration
I'm trying to create bootstrap plugin that will be used for copying content to clipboard.
I managed to build working version of my plugin but I'm wondering how I can improve it.
Idea is to show a ...
0
votes
0answers
31 views
Dynamically display relevant form elements
Here is a group of questions (hidden by default except the first one) with yes|no buttons
...
2
votes
1answer
56 views
Adding HTML DOM template
I'm new to JS and jQuery. I wrote this function which just does what I want, but it seems very unreadable, and because of my experience, I don't know a better way to handle it.
Could you please give ...
0
votes
2answers
122 views
Hide and show menu if button clicked and change the icon
I wrote simple jQuery code and I want suggestions as to how I can do it better and shorter.
Basically the following code is used to change the menu icon on each click event and also hide and display ...
3
votes
2answers
189 views
Elevator program code challenge
I recently applied for a job where the company gave me the following prompt for a code challenge. They have since told me "yeah, no thanks" but provided me with no feedback about why they came to that ...
3
votes
1answer
95 views
jQuery on-change using multiple selectors
What is the best way to refactor the following code to avoid duplication?
...