Tagged Questions
0
votes
1answer
14 views
Show <div> on <li> click
Simple task, I am just trying to have the data that correlates to a menu item hidden until it is clicked. However, I feel like this can be optimized. There are 2 ...
2
votes
0answers
18 views
Homemade Lightbox and Image Gallery
I'm new to JavaScript, and I've built a lightbox for an image gallery. There's a button to open the gallery, plus forwards, backwards, and close buttons, and keyboard controls. Currently, everything ...
8
votes
1answer
65 views
Calculate torque of a bolt based on grade, size, and lubricant
To calculate torque I need to look up a value from a table which I've hardcoded based on three conditions: grade, size, and thread. Then I need to multiply it by coefficients associated with the ...
4
votes
2answers
139 views
HTML Pencil: an online HTML editor with real-time preview
HTML Pencil is an online HTML editor created for modern browsers.
Please review the source code and provide feedback:
...
4
votes
1answer
38 views
Multiple drop down validation
I have written some jQuery which validates a group of drop downs. It checks the text value selected in all the drop downs (first three characters), and if there is a duplicate, it warns the user.
...
3
votes
2answers
30 views
DOM building using DocumentFragment
I want to build the markup below by iterating on an array of objects. The structure of the object is also listed below. I need some tips on how to make it clean.
Markup I want to build:
...
2
votes
1answer
37 views
b10k minigame problems
I tried to recreate a mini game (not sure about its name, I call it b10k) with 2048 looks, therefore it looked better if I use html elements, and I really am not good at working with them, but I ...
2
votes
1answer
52 views
Simplifying AJAX success code
Please take a look at this Fiddle.
Is there a better way of building a table with titles in the first cell of each row, like this:
...
3
votes
1answer
56 views
Script for adding a set of form fields on clicking an Add More button
This is a script that I use to add a set of form fields on clicking an Add More button:
...
5
votes
1answer
73 views
Basic and simple view, add, edit and delete functionality
I want to know what needs to improve with my application. Maybe there is a better way instead of what I am using currently.
index.html:
...
5
votes
0answers
97 views
How can I make my website have a more modern look? [closed]
After looking at my site, I've been told by my bud:
You know what this looks like? The nineties.
I think it looks alright, maybe a little old fashioned but I've been staring at it so long now ...
10
votes
1answer
72 views
Loading the resource identified by a script element's src attribute
I have a function to load the resource identified by a <script> element's src attribute.
I need it to:
Be as universal ...
7
votes
2answers
159 views
Cleanup code to add div structure to element
I was cleaning up my code when I came across this situation :
...
21
votes
4answers
2k views
Snowfall in HTML
I am a beginner and I have made Snowfall in HTML for my mom. I'm pretty sure it will not look that awesome to any developer out there, but hey, that's why I've posted it.
I'd like a general review of ...
7
votes
7answers
781 views
DRY-ing jQuery code for portfolio site
I'm currently working on my portfolio site and it's all great, but I'm unsure how to DRY my jQuery. I'm repeating myself a lot in the jQuery and it's just messy.
HTML:
...
3
votes
3answers
125 views
A simple HTML / JavaScript calculator
I am making an app and I want somebody to check my code to maybe make it shorter, fix bugs, or add some things.
...
4
votes
3answers
92 views
Is it possible to condense and/or tidy these jQuery functions?
Here is a JSFiddle of my problem.
I have one <select> on the page that lets you choose a brand:
...
6
votes
1answer
352 views
HTML / JS Slot Machine Simulator
This code is a slot machine simulator that uses elements of both HTML and JavaScript. Please pardon the lack of comments.
...
2
votes
1answer
59 views
Guild Wars: Knights & Dragons - Version 2
I have changed a lot from my original code that I posted about a week ago, you can see that here:
Guild Wars: Knights & Dragons
Now what I need to know is if I improve this code further. Any ...
2
votes
1answer
98 views
HTML cleaner in JavaScript
Please review code quality and give me shortcuts or optimization tips as well as corrections.
...
2
votes
0answers
136 views
AngularJS with global data and “service” / using $watch on $rootScope
I am currently learning angular.js.
The following is an example I came up with. The goal:
An editor for a dict, the dict format is: {key: [type, data]}
A view of the same data
The "type" should be ...
1
vote
2answers
58 views
How to automatically insert HTML to a form and obtain the inputs?
For a form I got the markup below, it belongs to an input category and as there can be more than one insertion at it I includded an Añadir button (Add).
I give ...
3
votes
3answers
216 views
Guild Wars: Knights & Dragons
I want to improve this code to make it look more professional, be loaded quicker and make it cross-browser compatible. Do note that it is not a finished site. I want to know the best practice for ...
4
votes
1answer
37 views
Hiding and revealing toggle responds very slow
I have a list of 6 items, and each one on click reveals a div that runs 100% wide under the row of list items. The code works, but the div opens very slowly and kind of choppy. Is there anything I can ...
5
votes
1answer
38 views
JavaScript scrippits
I was doing writing some various things in JavaScript and ending up writing 2 scripts that proved useful in quite a lot of my other programs and I was wondering if there was anything that I could do ...
7
votes
3answers
129 views
Most efficient way of creating a grid in HTML with CSS?
So my problem is this, I need to create a grid that in each cell there should be a 0 or a 1. These cells when clicked should toggle between 0 and 1. When hovered It should show the coordinates (ex: ...
2
votes
1answer
91 views
A better way to read text files into html?
Currently I'm making a website that has a to-do list that will probably become quite long to write in html. So I decided to make a shorter version for me to write that I find more comfortable to read.
...
4
votes
3answers
144 views
Is my web site structured correctly?
I'm trying to get a better handle of code organization and how HTML5 (really HTML) stack works in general. I've worked mostly with ASP.NET Webforms and done some MVC as well. Let me say now, "I hate ...
3
votes
2answers
40 views
HTML/Attrs Tester Environment
I have a few objectives (which are working fine, but I want tips in case I can improve it).
Let me try to make this as clear as possible, as this is a much larger project:
There are three move ...
2
votes
2answers
56 views
Interupt redirect to catch potential newsletter signup
This is a piece of code I am working on to reuse in a few places on various websites. It is used to capture name and email addresses for people interesting in registering for something, we want to ...
3
votes
1answer
573 views
Google Maps Javascript API v3: Sorting Markers with Check Boxes
Recently I built a map with custom markers (pins) and a sorting function to display each by type (Member, Supplier, Prospect, New Member).
The HTML (check boxes wired up with ...
4
votes
3answers
69 views
New Game - Am I going down the right path for DOM manipulation?
I find myself using a lot of .find functions within what I'm developing. The reason being that I need to run this same function on a TON of different characters ...
5
votes
1answer
61 views
Dynamic matrix in web browser
Today, my project was to make a matrix in my web browser. It is really slow, so help with optimizing it would be nice. It runs slow on my PC, yet alone my iPod 4 which this is going to be for.
...
5
votes
1answer
134 views
Expandable navigation menu
I am trying to step to the next level from student to amateur web developer, and I would like to make sure I am not making any web-development no-no's, that's all. What caused me to want to ask SO ...
4
votes
1answer
272 views
Fading and Loader jQuery Improvement
I'm not much of a jQuery coder (more of a PHP coder), except to call a few get values out of class and id and Ajax calls. However, I need to make a checkout system work and one thing I would like to ...
1
vote
1answer
134 views
Caesar cipher implementation
I am not very familiar with JavaScript and I'am a little confused with the object oriented peculiarities of it. I am trying to create a Caesar shift using the concepts of objects, methods and ...
6
votes
2answers
168 views
How can I optimize this father son project?
I made this bit of code that uses jQuery in a simple HTML file to see if my son would think it is fun/interesting and to help me with my jQuery skills. The thing that was hard was the selectors ...
2
votes
0answers
64 views
Insert and Delete (a list of specified) characters/words in headline [duplicate]
I'm very new to JavaScript and I'd appreciate some help.
Here's a jsfiddle: http://jsfiddle.net/KYjF9/3/
I'm trying to make that code more elegant and also valid at http://www.jslint.com/ (browser ...
4
votes
2answers
55 views
Simpler way of showing, hiding & disabling elements
I'm currently having this code & looking for a simpler and shorter way of showing, hiding & disabling my elements...
...
3
votes
3answers
120 views
Grouping similar jQuery functions
I want to group the two very similar jQuery functions into just one. Any idea?
HTML:
...
4
votes
1answer
76 views
Triggers placing and sizing elements for video controls
I have some triggers placing and sizing elements for video controls. It works well enough but mostly through trial and error and I am not sure if there is a better pattern:
The full source can be ...
5
votes
1answer
109 views
Cleaning up a dining hall…website
I am making a website that takes a bunch of dining hall information and puts it all together in a neater (and hopefully more mobile friendly) form.
Here is the link:
...
10
votes
1answer
275 views
Colorful Lights in HTML
I am a beginner and I have made Colorful Lights using check-boxes in HTML. I'm pretty sure it will look horrible to any developer out there, but hey, that's why I've posted it.
I'd like a general ...
7
votes
1answer
140 views
interactive slider
Task:
Create an interactive slider that allows the user to view a given image gallery.
Slider controls:
See previous slide
See next slide
Quick navigation through the images / Paging - ...
5
votes
1answer
164 views
Active Directory details page
Recently I have been making an MVC application with a fluid, responsive design in mind. One of the views has been to implement a fast responsive active directory details page. This is how I have ...
4
votes
2answers
359 views
3
votes
3answers
115 views
Login script that checks two users and their corresponding passwords
Please let me know what you think. Is the code well written? Am I using best practices (like when I chose === over ==)? Is my ...
2
votes
1answer
58 views
Drag and normal upload code
This is a partial code of my JavaScript app.
The openDoc function's task is:
call newDoc if use uploads a file through ...
3
votes
2answers
80 views
Horizontal menu for 3 items
My task was to create a menu that displays three items (A,B,C), and has two nav buttons <- and ...
5
votes
1answer
65 views
Shorter way of writing my displayError() function?
Is there a way I can write this function with less code?
jQuery
...