Tagged Questions
11
votes
2answers
250 views
HTML5 / JavaScript Tic-Tac-Toe
As an exercise, I decided to create a simple Tic-Tac-Toe game. It is Ruby on Rails based, but as for now I'm not using the server side for anything (I intend to build up on it in the future, though).
...
10
votes
3answers
875 views
Ultimate Tic-Tac-Toe Challenge
This is my attempt at the Ultimate Tic-Tac-Toe code challenge.
It uses jQuery to build out the game grid and find the states of all the "buttons" (actually ...
10
votes
3answers
211 views
MS Excel type of grid in jQuery
I have created a MS Excel type of grid in jQuery. I want to learn best practices and I need your comments for more optimized code.
Please review the code and offer your suggestions.
Demo
jQuery:
...
10
votes
4answers
896 views
Any tips on making this JS better?
Working on a personal project to keep different snippets/examples/small projects of mine organized. I want to make the most of my page width, so I decided to write a navigation menu that slides out. ...
9
votes
2answers
1k views
Display progress bar to show async. request status using JQuery
Instead of using ProgressBar plugin, I've below script to display the progress bar for async. requests on the page. Could anyone provide any feedback on this esp. if there will be any issues like ...
8
votes
1answer
149 views
Please review my Nonogram game
I am writing a Nonogram game in JavaScript.
I would like to know your opinions on the code and suggestions on how to improve it.
I'm using a MVC approach.
the Model has two matrices (represented ...
5
votes
2answers
441 views
Injection with Chrome Extension
I am building a Chrome extension that injects a small overlay in to all websites using a content script. At this point all the injected elements do is sit in the bottom left corner. It has two buttons ...
5
votes
1answer
205 views
Is there a shorter way to write this jQuery code?
I'm using two category filters from this demo. I give the filters two different sets of classes so they won't affect each other. Since I'm very new to jQuery, all I can come up with is repeating the ...
5
votes
2answers
165 views
Toggle script trouble
I have been working on a toggle script, but I find myself repeating my code. Is there a way of combining it all? I am new to jQuery, so forgive me for my beginner question.
HTML:
...
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 ...
5
votes
1answer
121 views
Is this a reasonable way of doing javascript navigation UI?
I think that the slice() is a bit hacky, and prone to breaking if I change my mind about the id names, but I wanted this to be generic so I could add types easily
Is there maybe another / better way ...
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:
...
5
votes
1answer
3k views
Handling Hover Events on a Touch Screen
A website I have designed uses a nav menu that shows submenus on :hover. The initial site did not use any responsive design: it targeted only the desktop environment. I am now using responsive-design ...
5
votes
1answer
66 views
Form generator for inputting URL, description and link
This is a form generator I created so users can input a URL, description and link. The output will eventually be a JavaScript news slider. The HTML the form generated is irrelevant for now but I'd ...
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 ...
5
votes
1answer
74 views
jQuery Fallback Support for the CSS Property “background-attachment: local”
I have made some jQuery Fallback Support for the CSS Property "background-attachment: local" and I am mainly a CSS developer. I do some jQuery, but I thought I would check to see if I am doing this in ...
5
votes
2answers
703 views
HTML/CSS/jQuery - Code Review
I've been using CSS and HTML for a while and I'm trying to start to use better methods of coding.
I've tried my best not to hack anything, etc etc so I wondered if anyone could let me know how I'm ...
4
votes
2answers
51 views
Conditional Branching Using Filter
I'm using multiple jQuery filter functions to affect the background color of select objects based on the selected option and it works, but it seems bulky/redundant. Does anyone know how these filter ...
4
votes
1answer
817 views
Basic Javascript Game. All code critique very welcome
This is my first JavaScript/jQuery project after having been reading and learning for a good few weeks. I am proud I have made something that at least works. However, I'm sure that my code is ...
4
votes
2answers
322 views
Simplifying Code for Drop-Down-Box in JQuery and HTML
I'm trying to come up with a way to make a drop down box that is displayed through a jquery mouse hover event and with nested dropdown boxes displayed through hovering over elements of the original ...
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 ...
4
votes
2answers
226 views
Changing text with a click event: how to restore default state of text in jQuery if/else statement
I have a click event that calls a function which makes some CSS changes (acts on Text in 3 unique text elements).
The function (below) works, but is lacking a 'restore default' function (to return ...
4
votes
1answer
67 views
Horrible nested if statement for changing CSS based on RadioButton selection
I'm writing away for this website, and I've come into a problem. I need to display only one td based on the corresponding radio button pressed. However, there are ...
4
votes
1answer
830 views
Rendering hidden element from view in Rails, HAML
Simple example, I need to render div with some text hidden by default. I'll do something like:
...
4
votes
1answer
2k views
3
votes
5answers
734 views
Detecting collision of two divs
I have two divs as seen in this JSFiddle. To recreate the problem, keep clicking on the Gray container till both divisions touch each other.
The purpose is to ...
3
votes
4answers
109 views
Coding upgrade (CSS3 x jQuery) tips
I'm just beginning web design, and I've come up with this code to scroll to a place in the same page.
I don't know if this can or should be improved much longer, so I'm asking for any tips that can ...
3
votes
1answer
476 views
Possibly optimize my Jquery code?
I am creating a tab plugin. I want to know if there is a better way of doing this or if what I have is good. It works just fine, but there may be some shortcuts or a more optimized way of ...
3
votes
1answer
350 views
jQuery conditional statement to check if a select option has either of 4 values selected
I am working on this project that has a reservation form which allow users specify which sort of service they require. I have a select menu with eight (8) options and I have two divs which would ...
3
votes
1answer
78 views
Comment on this simple jQuery drag event
I would like some comments on my code and implementation for this simple piece of jQuery.
Basically it is 2 div boxes #side1 and #side2, in a container div called #frontimage, where #side2 can be ...
3
votes
1answer
617 views
Jquery File Tree Toggle - Code Efficiency
I am making a web app that will have a "my files" area and to do so I am writing my own html and jQuery to control the opening and closing of each folder (or ul li). I want to make sure that this web ...
3
votes
1answer
277 views
3
votes
1answer
154 views
Menu Bar Animation Plugin
I'm fairly new to JS/jQuery (a few months), and I think it's time to start getting involved in the community. So I wrote a little plugin. Nothing revolutionary. Really, the project is to write a ...
3
votes
1answer
376 views
Custom event to match CSS :target pseudo-class
The following code makes jQuery trigger a new target event on elements when they become the target of the fragment identifier.
For a very basic example, the ...
3
votes
1answer
748 views
Improving Twitter Bootstrap Tooltips with json data
This is a working example that I am trying to improve.
Throughout the application I am working on one of the requirements was to have tooltips everywhere. However the customer wanted the ability to ...
3
votes
1answer
196 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:
...
3
votes
2answers
337 views
3
votes
1answer
2k views
Custom dropdown menu using jQuery
I have written a custom drop down menu handler using jQuery because I felt that the native drop down didn't fit my UI.
I have taking into consideration the native way of going through a drop down box ...
3
votes
0answers
52 views
My first jQuery plugin
I am writing my first jQuery plugin that converts li tags to horizontal responsive barcharts. I am looking for some feedback and suggestions regarding the ...
3
votes
0answers
404 views
Is this a good way of making a File Input Control look like it has rounded buttons and a styled textbox?
We have orange rounded buttons as a standard on our site. For our purposes, we switched everything over to use an anchor tag, instead of input type=button. The exception to this was the File Upload ...
2
votes
3answers
278 views
Tidying and optimising code
I have the following code in jsfiddle. I have been told this this code is messy and not optimised. My question is, what about this is messy and unoptimised and how can it be tidied up and optimised ...
2
votes
4answers
468 views
Simple Javascript Widget without cluttering global namespace?
I've written some Javascript code with jQuery to display a dialog box on a web page that "floats" in the corder of the page.
(1) It has the following features: the dialog follows as the user scrolls ...
2
votes
3answers
125 views
Beginner jQuery – Coding Fundamentals / Performance
Empty Textboxes, class="loc" display "(City, State \ Country)" using italics and silver. Of course, Textboxes that do have data are displayed according to page defaults.
I noticed chaining and ...
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 ...
2
votes
2answers
372 views
Calculations with a table containing football data
I am trying to use jQuery to make calculations with a table containing football data. Can I improve what I have done here? Is my code well-structured and executed, or does it need improvements?
...
2
votes
2answers
262 views
Am I using jquery correctly in my first simple project?
Please review my first query project, it achieves the desired result, but am I doing it right?
...
2
votes
1answer
1k views
More efficient jQuery scripting when manipulating multiple elements with multiple CSS attributes
I'm relatively new to JavaScript and jQuery so go easy on me. I'm creating a website where upon jQuery document.ready a set of basic animations are performed on ...
2
votes
2answers
506 views
Query, populate, show, hide data
I have created code to show/hide data from a DB. It works, but as I am new to jQuery, I would like to know if this is a good way.
HTML:
...
2
votes
3answers
119 views
jQuery code improvement
I wrote this code using jQuery, but I think it can be improved. Can you guys give me some feedback?
...
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 ...