1
vote
1answer
72 views

jQuery plugin: Parsing a JSONP feed using ajax()

I'm fairly new to JavaScript and jQuery and this is my first attempt at creating a plugin. The code below I've written to parse a JSONP feed from a search engine API (funnelback) using ajax() calls. ...
0
votes
1answer
33 views

Review of jQuery Plugin for TreeViews

Looking for a review of my first published jQuery Plugin. It's for treeviews, very basic example demo can be seen at: Demo Everything works fine, just looking to see if I can get some feedback on ...
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 ...
3
votes
1answer
116 views

JS/Jquery newbie here… Can I please get some advice on improving my code?

You can see the JS at the end of this post in action here at http://andrew-oh.com/portfolio/timeline/ (It's responsive!) I've recently picked up javascript/jquery and would love some feedback on how ...
2
votes
2answers
971 views

Toggleclass best practice (JQuery and CSS syntax)

I've created this fiddle: http://jsfiddle.net/9SXLJ/ to demonstrate something I've been working on. I've been trying to mimic the behaviour of Twitter where a tweet is expanded, the border-radius and ...
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: ...
7
votes
3answers
294 views

If I write spaghetti code, I'm gonna have a bad time. Help with this ajax/jquery logic please :)

This is a pretty simple script. In short it's meant to look for an id in the data attribute in each containment div, then send an ajax call to get the amount of retweets, calculate the karma based ...
2
votes
2answers
244 views

jQuery tabs improvement

I've written a small function which displays a div related to an anchor element using data attributes. The data attribute is used to match the class of the relevant div which is then displayed whilst ...
1
vote
2answers
137 views

Does this javascript code leak?

I've been coding in javascript for a bit over a year now but never paid much attention to memory leaks. (I know I'm an idiot) I built my first long running AJAX heavy app and memory leaks are eating ...
1
vote
2answers
143 views

As professionals, is there anything clearly amateurishness about this code that I could improve?

This is just a simple login form with a very vanilla HTML mark up, but I just wanted to get some professional feedback. I know about jslint and try to adhere to there principals where possible. Any ...
0
votes
1answer
55 views

Review code for correct approach to create a basic jQuery slider?

I am writing code for a very basic jQuery slider with the following features: Slide the content left or right on click of next/previous links till there is no more content on the clicked side. If ...
0
votes
0answers
163 views

Creating boilerplate for jQuery plugins

I've been writing some smaller jQuery plugins lately, and I've been thinking of writing up some boilerplate that I can use when writing new ones. I have code that works (for now), but I want to share ...
1
vote
1answer
134 views

Encapsulation of client side logic in web page

Is this the best way of doing this. The sample code is a simple lookup of postnr (read zipcode). I'm trying to encapsulate all the client side logic inside one "class". Is this the way of doing ...
4
votes
1answer
2k views

Pie Chart jQuery-UI plugin

I would greatly appreciate the input of any gurus out there. I have recently begun learning JavaScript and then jQuery and jQuery-UI and have thought I would take a stab at writing my own jQuery-UI ...
1
vote
2answers
166 views

Is it ok to use multiple jQuery methods in one single statement?

I am creating a step-by-step form (it only shows in step-by-step and is not a multi state form) and the parts slide in and out (similar to GitHub but without the browser's back buttons). I have ...
2
votes
0answers
92 views

Is there any way to shorten up this Facebook API call?

Right now I am working on an AJAX call that grabs a random photo that a Facebook user is tagged in and then grabs the large source for it. Is there any way to speed this up or at least distill the ...
2
votes
2answers
238 views

What do you think? (jQuery)

I need some comments on the code that I "assembled". I want to know if it is efficient because I intend to use it on a live site . I'm not a programmer guy so I used the trial and error method to make ...
2
votes
1answer
111 views

How can I Shorten and Simplify Ajax callback processes?

I've reusing this code for multiple areas and will like to make it more short and/or portable. What suggestions or changes could I make to simplify shorten it's callback processes? ...
2
votes
0answers
226 views

Javascript application with ASP.NET/jQuery, best practice

I want to create a JavaScript application like gMail with: Framework: ASP.NET Browser Framework: jQuery Database: MySQL My idea is: When the window.onhashchange fires up, I load the ...
2
votes
1answer
200 views

How can I simplify/improve this jQuery code & comply with best practices

I'm trying to improve the quality/efficiency of my coding (having only been learning jQuery for a couple of months). I have a function which loops through all $('.loop-bar')'s and applies a jQueryUI ...
2
votes
2answers
284 views

How would I improve structure of this script?

I am not certain if this is too much code to ask to look at. But generally I feel that the pattern I use for development is kind of wrong. I start with simple functionality, then when I realize that ...