Tagged Questions
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 ...
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
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 ...
1
vote
0answers
77 views
Minimize code modal dialog and jQuery AJAX calls based on button click
HTML Code: for Add New button
...
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:
...
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 :
...
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:
...
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:
...
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 ...
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 ...
0
votes
1answer
443 views
CSS and HTML5 for this fixed header on scroll
When I had to create a fixed header on scroll, I found a few examples on Stack Overflow but they were terrible in the sense that they relied on a fixed page height. Have a look at what I created which ...
1
vote
0answers
43 views
Generate HTML from JSON (most efficient way in jQuery)
I have to generate a lot of tables from different jsonfiles (up to 20 tables per page). Because it's a lot of data, I really want to keep loading speed in mind. I know it's better to use a non jQuery ...
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 ...
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 ...
5
votes
1answer
210 views
Responsive jQuery restaurant menu system
I have a working restaurant menu system - as the user selects a menu it slides into view. The build is responsive, I've used the 'Debounced Resize() jQuery Plugin', however in implementing the ...
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 ...
1
vote
1answer
43 views
Eliminate nested HTML elements for jQuery animation?
Background
When a user leaves a page, if they haven't submitted form data, a button is animated to draw the user's attention. (This is a poor UX choice--all the form data should be submitted--but it ...
2
votes
1answer
61 views
Simplify some resizeable HTML
I am generating a content bar with jQuery, that can be inserted into any webpage. It is a <ul> with two smaller lists within it. Those two minor lists have a ...
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
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 ...
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:
...
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 ...
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
...
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 ...
1
vote
1answer
64 views
Spam validator - beta version
I wrote a PHP function 7 days back , which avoids (calculate spamming severity) via manual spamming . So was just a curious to know, what if I create a JS plugin (my first) which can act as an SPAM ...
3
votes
1answer
101 views
Best practice for generating jQuery dynamical content
I am new user of CodeIgniter and I am trying to build an application that there are lots of jQuery dynamical content.
Below I provide a code that I am using in order to be precise. The code below is ...
5
votes
1answer
82 views
Tooltip plugin for portfolio website
I am writing my own tooltip plugin for my portfolio website that I am currently working on. It works rather well, however, I feel that there is a lot I could improve. This is one of my bigger jQuery ...
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 ...
8
votes
1answer
141 views
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 ...
9
votes
2answers
97 views
Member list reveals member information on click (#1)
What I'm doing?
I'm creating a member-list where initially only the names are visible. Clicking the names reveals the member information. This is done with jQuery by adding/removing classes.
I left ...
4
votes
2answers
161 views
Simplifying this form validation script - version 2
A week ago, I have asked how to simplify a form validation. From the answers, the code now is improved. Can anyone please share their opinion on the approach used below and advise me if there is a ...
4
votes
2answers
305 views
Append table cells to select boxes in indexed order
I am having a huge brain fart with efficiency right now.
The idea here is if I have a static table (unfortunately formatted this way with the data I've received), ...
6
votes
2answers
108 views
Simplifying this form validation script
Can anyone please help me to simplify this form validation script? It works great but I was just wondering if I can get some help to make it simpler. Your opinion on the approach I used below is ...
2
votes
3answers
373 views
How to improve this current contact form?
I have just started learning how to build websites, and I have been experimenting by creating a contact form.
Here is what I currently have - can anyone suggest and recommend ways enhance my current ...
2
votes
1answer
9k views
jQuery dynamic elements like TR and TD, add to HTML table
Is it possible to create dynamic TR and TD elements in an HTML table? Something similar but better than this:
...
2
votes
1answer
69 views
Compacting jQuery Code for Framebox Plugin
I have written my first jQuery plugin for a website. It is, essentially, a Fancybox style popup that uses AJAX to load content from other pages. It's kind of a frankenstein build from multiple ...
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 ...
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
764 views
Creating <select> element and append data to it
I've made the following and have a few questions:
Do I have some (big) mistakes in this approach? (bad practices, 'this code is trash'...)
1.1 If I do, can you suggest what to fix?
Are appended ...
2
votes
2answers
114 views
How can I improve this text revelation effect?
I would be glad if someone could take a look at my code and maybe improve it. It's an animation effect to gradually reveal text as if it were being decoded. I wouldn't mind if it could run with jQuery ...