a JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development.

learn more… | top users | synonyms

0
votes
1answer
24 views

How can I improve my code which dynamically populates a section of a page?

My site consists of a lot of asynchronous calls, and because of this a lot of content is dynamically added to the page. For this section of code I've dynamically added tabs to a page and need to ...
1
vote
1answer
49 views

Should I use anonymous functions in my javascript program?

This question is about the best way to declare functions in Javascript. the app is a small 2 player board game I'm working on as part of a bigger web page. Basically I have a socket which receives and ...
-1
votes
0answers
14 views

Razor Jquery Error [closed]

<script> @if (ViewBag.checkedArtikel != null) { foreach (int ac in ViewBag.checkedArtikel) { String temp = "'#addartikel" + ac + "'"; <text> ...
2
votes
0answers
32 views

JQuery code repetition and MVC

A while ago I started working on a project, which does things mostly with JQuery and PHP. I had some problems with my structure and started using CodeIgniter which uses an MVC pattern. So the PHP part ...
1
vote
1answer
32 views

my first jquery/json

This is my first use of jquery and json so would be grateful for any feedback please. Background - this is on a job listing site and it has a Linkedin apply button plugin - this provides for a ...
0
votes
1answer
55 views

Review my first attempt at a jQuery plugin

So this is my first attempt at creating a jQuery plugin. InstaSlider is a lightweight jQuery image slider / carousel plugin that populates content from an Instagram hashtag. After searching for a ...
10
votes
8answers
609 views

Is there a shorter/cleaner way of writing this set of jquery .onclick functions?

I am hiding and fading in different content on the same page using jquery to hide() and fadeIn() the content depending on which link is clicked. It works how I want it to, but the way I've written ...
3
votes
1answer
80 views

First Javascript - Geocoder - Can it be improved?

So I'm pretty excited to have coded my first javascript file which now works, and I've spent my evening trying to improve it. It takes a location in the #loc input box and geocodes it (gets ...
-4
votes
0answers
50 views

I've spent a month without washing, shaving or leaving my office [closed]

Can you please look over http://www.interimspaces.co.uk and tell me what you think. specifically - problems and feedback. THank you
1
vote
0answers
33 views

Review my Zepto / jQuery plugin base

I am looking for a starting point to code plugins, primarily for Zepto.js (with fall back for jQuery). These will provide reusable functions for Tumblr theming. However, I can't seem to find ...
2
votes
1answer
40 views

jQuery: How to optimize this code

I am using this code for my responsive layout mobile sidebar hide show. I am not expert in jquery and just wonder if I can optimize this code with same functionalit $(function() { var a = ...
0
votes
1answer
29 views

Code review jQuery form preview

How can I improve my jQuery form preview implementation. Currently using the jQuery Instagram Plugin to get the hashtag from Instagram. var timeoutReference; var element; var tagsa; ...
0
votes
1answer
33 views

Using jquery to prepare jQuery UI tabs, optimize?

I am looking for someone to review my solution to a jQuery DOM manipulation exercise on appendto.com: http://learn.appendto.com/lesson/dom-manipulation-101#exercise I'm wondering if there is a way I ...
-2
votes
0answers
99 views

How to better structure my Javascript code? [closed]

The way I currently write my Javascript code is the following: $(document).ready(function(){ // store vars var $var1 = $('.element1'); var $var2 = $('.element2'); function doThis(){ ...
2
votes
1answer
46 views

My login with AJAX and PHP

In your opinion, do I need to do all these validations. I thought to do well and stay safe but I seriously raises the question if it isn't slower. jQuery code $(document).ready(function () { ...
-1
votes
1answer
53 views

ASP.NET MVC 4 Shopping Cart - Cannot update shopping car items using JQuery , Ajax, jSON, jGrid [closed]

I have this code in a C# MVC 4 VS2012 project. I need to be able to update the shopping cart with jSON data using JQuery/AJAX, i'm using jqGrid to display the data and pulling the shopping cart items ...
2
votes
1answer
31 views

Condensing Navigation jQuery

I have some jquery that pretty much just runs a small drop-line navigation. Each tab size differs, so i used the same jquery line 5 times to make it look and function the way i wanted it to. I'm sure ...
1
vote
0answers
48 views

Jquery Dropdown plugin looking for OOP tips or advice!

;(function ( $, window, document, undefined ) { if ( typeof Object.create !== 'function' ) { Object.create = function (o) { function F() {} F.prototype = o; return ...
1
vote
1answer
65 views

JQuery is working but clunky/slow

I'm coming close to finishing a site where there are a number of jQuery functions going on. They all work, but the page is just running a bit too clunky. The fading in and out is just not as smooth as ...
0
votes
0answers
63 views

jQuery highlightNavigation plugin, review request

I have written my first jQuery plugin using one of the design patterns suggested on jQuery's site: http://docs.jquery.com/Plugins/Authoring. As listed below in the description comment, it's purpose ...
2
votes
1answer
133 views

Works, help clean up code

This JavaScript code works but I do not think it's coded cleanly, can anyone help clean it up? This code is for the back-to-top feature, when user gets to the bottom of the page, it scrolls them back ...
1
vote
1answer
58 views

How can I make jquery animations faster for mobile devices?

I recently made this campus timeline for my university. You can see it here My question is this: When viewing the timeline on a mobile device (not a tablet), the navbar changes so that you can jump ...
3
votes
1answer
123 views

Jquery sortable style function

This is a basic sorting function written in jQuery that moves items in the DOM around to create empty spaces for a droppable(). Since there is so much going on in a droppable over event, i'd love some ...
0
votes
1answer
75 views

Tidying js files

I usually find the .js files to be quite messy and the truth is that mines are even worse than the average as, being soft, I'm not the sharpest tool neither at Jquery nor Javascript. So I would ...
0
votes
0answers
100 views

What's wrong with this javascript programming approach?

Helllo people I'm now developing an instant messaging system but I'm a little confused : I can't decide which approach do I have to choose! Here is a code and I want you to tell me what is good/bad ...
1
vote
0answers
56 views

Jvector Map add/remove function shorten code

I am achieving a hover state per continent through: var continentId ="" function getID(continentId){ jQuery.each(mapObject.mapData.paths, function(i, val) { if (val.continent == ...
1
vote
1answer
40 views

Using .hover recommended?

Is there a better way to write the JS for this? I'm asking because I read from somewhere that using .hover isn't recommended. Also, if I move the mouse in and out of the box really fast, the box fades ...
0
votes
2answers
56 views

help me optimize/simplify this jQuery function

This works as intended, but was wondering if there is a more efficient way of coding this. if (window.location.href.indexOf('/search/') >= 0) { switch ($.cookie("Layout")) { case ...
1
vote
2answers
27 views

jquery checking nested input with repetitive code

I have a table with 'nested' inputs that need to be checked or unchecked when a button 'select all' is pressed. There are several levels that can be toggled with their respective 'select all' button. ...
1
vote
0answers
26 views

Exceptions for control flow

I just wrote the following javascript (jQeury loaded): var valid, ui; try { $.each(this._cache, function() { $.each(this, function() { $.each(this, function() { ...
1
vote
1answer
41 views

autocomplete jquery -renderItem- option

$(function() { function log( message ) { $( "<div>" ).text( message ).prependTo( "#log" ); $( "#grille" ).scrollTop( 0 ); } $( "#my_ac" ).autocomplete({ source: ...
2
votes
0answers
77 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 ...
-1
votes
0answers
24 views

jQuery .click not working in Safari [closed]

I have a Wordpress site where i'm using Gravity Forms to create an upload form. I'm using the follow code to create a Lightbox-style Popup when the user hits 'Submit'. jQuery: <script ...
3
votes
2answers
35 views

How to refactor this jquery code without loosing the understandable factor of it?

<div id="members"> <div id="inputRow0"> <input id="input0_0" class="input" type="text" /><br/> <input id="input0_1" class="input" type="text" ...
0
votes
0answers
48 views

D3.js zoomable map code review

I have this code http://bl.ocks.org/nkhine/3150901 and would like to have it reviewed: function thisClient() { "use strict" var self = this var width = 960, height = 500, centered, ...
5
votes
2answers
83 views

Do not select elements that contain data attributes

I have a selector that pulls in all anchor tags that start with the # symbol. I am trying to add a :not selector of some form for elements that have a data attribute. I know I could do the ...
1
vote
1answer
26 views

Improving my jQuery animation

I wrote the following fo create an animation which collapses a navigation bar, load new content for it and expands it again. Meanwhile, the rest of the page content fades out, loads and fades in ...
5
votes
1answer
71 views

Can I improve this jQuery based flow diagram?

I have created a proof of concept jQuery based flow diagram based upon kayen's answer to this post click through yes/no questions from OPML one at a time This diagram shows the flow diagram that I ...
1
vote
0answers
99 views

Optimize jquery plugin

I would like to know any feedback on how optimize this jquery plugin use for triggering change event on any DOM element. This plugin don't use any timer to check for DOM change but instead extend some ...
1
vote
1answer
64 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
74 views

Have I put too much into my tooltip showing and hiding functions?

Tonight I decided to revamp some code I wrote a few months ago. One part of that was to do with showing (and hiding) tooltips. The functions are called with: jQuery(element).showTooltip('HTML'); ...
0
votes
4answers
156 views

Can this javascript be improved? Shortened? How?

You can find an example of my tabs here: http://jsfiddle.net/mAuJr/ The jquery tabs work well as intended. However I was asked to include arrows alongside the tabs so readers could navigate through ...
3
votes
1answer
33 views

jQuery - Drop Down QA

Here's a fiddle: http://jsfiddle.net/YF8cg/ Focussing entirely on the javascript and on the structure of the HTML (.qapair .question and .answer), how could I improve this system? JS: ...
0
votes
4answers
31 views

How to optimize jQuery code

I am using jQuery's collapsible lists grouped and named #List01, #List02, #List03, etc.. My java script code captures clicks on list elements and remembers list item's id for further processing. Each ...
0
votes
3answers
77 views

Improving JavaScript - using objects vs. just functions

I'm no stranger to JS, but I think I still have a lot to learn. I originally wrote this code to manipulate a "help" bar, which would be positioned as a thin ribbon on the side of the browser window, ...
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 ...
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 ...
3
votes
0answers
27 views

What improvements can I make to this table filtering jQuery Plugin?

This plugin is meant to filter through a table based on column header text that matches options given to it. check it out here: Filter Table Plugin Plugin code below for reference: //framework from ...
2
votes
1answer
53 views

Cleaning up bloated jQuery code

I'm fairly new to Javascript/jQuery. The scripts below, I've obtained through tutorials and edited the best I know how. It all works - but I'd like to place them in one, external script. If at all ...
4
votes
3answers
132 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. ...

1 2 3 4 5 13