5
votes
1answer
324 views

Optimizing and consolidating a big jQuery function

I understand this is a very vague question and a lot of code to look over. My question is basically: I have all these functions that work together to create functionality on a page: is the structure ...
4
votes
3answers
137 views

Code Tidying up?

What is the best way to tidy up JavaScript code I have written. It seems very long winded, any suggestions to shorten it? note: I'm running it on Wordpress which runs jQuery in nonconflict mode. ...
4
votes
2answers
68 views

Improving Code pointers

I'm new to jQuery and I've been messing about with this code, It works but I want to learn how to shorten the code by the eliminating unnecessary repeated code. Below is a link to jsFiddle ...
4
votes
2answers
79 views

Font size resizable

Good morning, I started programming 5 months ago. I created a function to calculate the font size to fit the width of the website I'm doing. I believe the code is a bit ugly and could use some ...
3
votes
1answer
66 views

function to generate values of a javascript object

The following code works but I am wondering if it can be improved both readability and performance. I am using jquery and underscore. Any suggestions, comments or feedbacks will be appreciate. thanks. ...
3
votes
1answer
107 views

Column selection and URL modification

I have an HTML table representing a database table and a sidebar which holds different anchors ready to perform CRUD operations on click. Because the hrefs in the anchors aren't in general valid for ...
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( { ...
3
votes
2answers
189 views

jQuery Object Oriented Plugin

Update: Great answers up to now, but I would still love to have a bit of review about possibility of variable caching and the filter I'm using for rows and page sets! After seeing a lot of ...
2
votes
3answers
251 views

JavaScript code cleanup

As this community is full of experienced JavaScript developers, and I'm a newbie in JavaScript, I would like if some of you could look over my code for a website I'm building (personal portfolio) and ...
2
votes
1answer
601 views

Static quiz module with predefined answers

I was building a QUIZ module for one website. It is a simple TRUE/FALSE statements where you first choose the answer then correct answer is getting displayed and then you can move forward to next ...
2
votes
1answer
35 views

Multi jQuery Sliders, Help me write this in better code

I have three sliders with different min, max values, everything is working fine from following the tutorials on the jQuery UI website. $("#yield").slider({ range: true, min: 15.2, max: ...
1
vote
4answers
103 views

Clean up bloated jQuery code

I'm finally "done" with my small prototype for a element inside my website. I'm just a learner in the jQuery code and that reflects in my code. It's bloated, a lot of functions do the same thing but ...
1
vote
3answers
87 views

Improving Javascript code of a failed test

I just failed in a JavaScript test and I would really appreciate some comments of how I can improve so I can keep learning. The test was about making a form interactive, where the code should do ...
1
vote
1answer
117 views

Code to manage weekdays and hours

I have the following code: 1) the html part consist of two container. Both containers have a list of hour and day weeks 2) a javascript code which is used to manage these lists of inputs. I ...
1
vote
2answers
315 views

jQuery cleaner form submit function

What's a better and more elegant way of writing this: $('#footer form').submit(function(event) { event.preventDefault(event); $('#footer form .preload').spin(opts); $.post('contact.php', ...
1
vote
1answer
116 views

Multiple jQuery events on one element with different functions and target selectors

According to this two questions: [1] and [2] I need a way to combine these two methods of handling the event attachment in jQuery. $('selector').on({ mouseenter: function() {}, mouseleave: ...
1
vote
0answers
51 views

Reviewing javascript and tidying up?

This is a follow up to this question my code has evolved since so I'm reposting my question, What is the best way to tidy this up? how can this be refined? I am finding it's thrasing the layout quite ...
-2
votes
1answer
150 views

Accordion code needs feedback [closed]

I have come across this code that I have tried to add to but I am afraid that I have made of mess of it. I am not very experienced with Jquery or web design and I need help finding what I have done ...