5
votes
2answers
84 views

Do not select elements that contain data attributes

I have a selector that pulls in all anchor tags that start with the # symbol. I am trying to add a :not selector of some form for elements that have a data attribute. I know I could do the ...
2
votes
1answer
53 views

Edit/Details form in JavaScript

I have a Edit/Details form which has 4 user related fields. On click of Save, I save the edited fields to local storage (if supported) and display the same values in the Details view. Below is the ...
1
vote
0answers
54 views

JQuery Drag Div Code Simplification

My code allows for the user to move a div around a container div by clicking and dragging the top, much like a window on a desktop. It does this by waiting for mousedown then mousemove, getting ...
-1
votes
1answer
51 views

Trouble with jquery show and hide [closed]

I'm having a ton of trouble trying to get simple jquery functionality to work. All I want is to be able to click on a menu button and have a menu pop up and click outside of it to close it. I think ...
4
votes
1answer
94 views

This blueprint has already become a mess, please suggest some restructuring

I'm particularly concerned about where I have declared the functions, can I move them around to clean up the code without breaking anything? The "conjugate" function contains a lot of stuff that has ...
2
votes
1answer
2k views

Dynamically adding rows to an accessible HTML form

Given the following HTML form (fragment): <fieldset id="timesheet-rows"> <legend>Add Entries</legend> <div id="timesheetrow-0" class="timesheet-row"> <label ...
-2
votes
2answers
93 views

How do I refactor (DRY) this code? [closed]

I was hoping somebody could help me refactor my Javascript. Due to it's length (500 or so lines) I don't want to post it here. But check it out here on pastebin to let me know how I can improve it ...
0
votes
2answers
86 views

JQuery Slide Show Simplification

I'm trying to come up with the most basic example of making a JQuery slide show where you click on the current image you're viewing and you cycle through a gallery of photos. I know its probably not ...
1
vote
2answers
147 views

Is my code,design and practices is correct

<!DOCTYPE HTML> <html lang="en"> <head> <meta charset="utf-8"> <title>Login and Registration</title> <link rel="stylesheet" href="reset.css" ...
3
votes
1answer
131 views

How to improve this JavaScript implementation of a TODO manager?

I was asked to create a TODO manager using JavaScript and CSS. I did not get a good review on the code nor specific comments on how to improve it. My implementation: <html> <head> ...
1
vote
0answers
52 views

HTML5 Geolocation check and error management

I've written this code that I've been using for a while now to check for browser geolocation services for google maps applications. I have to say that I am not very happy with it as I've had to hack ...
3
votes
1answer
121 views

Can this Drag and Drop Script be Optimized to Perform Better?

I've just finished a week long adventure of creating an HTML5 Drag and Drop scheduler. As the prototype stands it works fine, but I'm curious if some of the code can be optimized. I mostly focused on ...
1
vote
1answer
237 views

JavaScript switch statement to make an AJAX call

I have a button group that looks like this: The user selects one of the options and they can search for a person based on that criteria. I wrote a switch statement that populates the URL to make ...
1
vote
1answer
137 views

Can this javascript with jquery be improved?

I recently started learning jquery and javascript and put this together for the site I work on here. /* * Manages the error report popups * * written by Tom Jenkinson */ ...
1
vote
1answer
100 views

Is there a better way of detecting when the contents of a web page changes in js?

This is the code I'm using at the moment /* * Adjust content height so that it always fills browser height * * written by Tom Jenkinson */ jQuery(document).ready(function() { ...
2
votes
1answer
2k views

JavaScript code quality

I decided to put together a quick project using jquery, the Kendo UI HTML 5 framework and JavaScript. I don't do much JavaScript development and I'd like some input on how to make this look less ...
3
votes
1answer
245 views

Can my code be optimized more?

Preview: http://sparksonrails.pennfolio.com/ Jquery: function introIconFirst() { $('h2.ribbon').css( { 'marginTop': '+30px', 'opacity': '0' }).animate( { ...
1
vote
2answers
96 views

jQuery animation procedural approach, suggestions need

I'm kinda worried that the way I did my animation intro is a bit too heavy and is not optimized. Please review and let me know your thoughts. $(document).ready(function() { introIconFirst(); ...
1
vote
1answer
378 views

Javascript Placeholder Polyfill

I was wondering if you could review the following code I've written as a polyfill for the placeholder attribute in HTML5? The object of the polyfill is to replicate the functionality of the ...
2
votes
1answer
460 views

Using jQuery 1.7 .on() and event.stopPropagation to close boxes when clicking in document body

I have the following code which works but seems like it could be improved. I'm not sure if I'm using event.stopPropagation() correctly or if it is the best solution. The elements are loaded via AJAX ...