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
0answers
4 views

Working GM_setValue and GM_getValue inside jQuery - Greasemonkey access violation

Was hard to find any elements of the full working code, here is one: // ==UserScript== // @name GM_ debug script // @description checking GM_setValue and GM_getValue with jQuery // ...
-1
votes
0answers
11 views

TreeView generated from database [closed]

I am using http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxtree/index.htm#demos/jqxtree/treebindingtojson.htm treeview control in my website. Problem is that my treeview is too large. That's why ...
1
vote
1answer
44 views

New to jquery, my first responsive image slider

I have been doing some codeschool classes on jquery, and I needed a image slider for my site. Right now their are only two responsive states but that will most likely change (and or become fluid ...
0
votes
3answers
34 views

JQuery hover with multiple ID's

I would like to see if the working code below can be written more elegantly. I am assuming there is a way to parse out the "r" and "h" to condense it down into a function. Any help is much appreciated ...
-2
votes
1answer
24 views

advanced asp.net improve performance [closed]

asked for help on my application , that's run on windows server 2003 and iis 6.0 ,this applications gross now , users now about 60,000 per day. and that what i did to make it faster a.SQL server 2005 ...
2
votes
1answer
25 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 ...
1
vote
3answers
94 views

How to make this code cleaner

Is there a way to write this code block cleaner and more readable? var shareNavigate = function () { scope.sharingActions.shareOnFacebook().done(function () { ...
3
votes
2answers
53 views

Replacing simple jQuery methods for better use

There are a few common jQuery call I find my self calling when creating my app. I need some help and maybe a better way to do all this or rewrite it. 1) Singleton Selector If I want to select only ...
0
votes
2answers
32 views

Is there a better way of writing this code?

I have made a mini image gallery which consists of one large div which has a background image of one of the galleries images. Underneath that there are five thumbnail images, that when clicked, ...
-1
votes
0answers
22 views

Need help optimizing this jQuery code [closed]

Below is a slider code that if used for more than one slider in the same page will not save each slide position. I need to have 8 sliders like this in the same page, so I repeat it 8 times. Would be ...
0
votes
1answer
39 views

How to make this function reusable instead of repeating it? [closed]

I'm using JavaScript and JQuery 1.8.3 to rebuild a form built by Django-filter. My purpose is to only present options that will yield a result to the user. The Django stuff all works fine and this is ...
-2
votes
0answers
81 views

Jquery File Upload (blueimp/jQuery-File-Upload) - ASP.NET MVC - How to Cancel Upload Async [closed]

created this in my github repository where I have the code of JqueryFileUploadblueimp implemented with ASP.NET MVC. Need some help about it, because I would like to know how can I cancel an UPLOAD ...
1
vote
2answers
31 views

jQuery sum outerHeight of multiple divs? Can I do this more efficiently?

I am summing the total .outerHeight() of multiple divs like this: // How can I do this more efficiently? var h = $('#div1').outerHeight() + $('#div2').outerHeight() + $('#div3').outerHeight() + ...
2
votes
1answer
37 views

Need suggestions to improve the code for an open source web based drafting application

My application. The repository and the file that needs review. Here is the source code $(function () { var draft = function (parsed, title) { var self = this; var wordCount = ...
-1
votes
0answers
41 views

Why does my validation not work on all PC browsers? [closed]

The validation code below works 100% on all MAC browsers. But on all PC browsers the validation is ignored. After the user submits the form the email is validated and returns a thank you message. Is ...
2
votes
0answers
59 views

Javascript / Jquery Recursive find function

I wrote the following code as a way of plucking data from a n-depth javascript object. It works a charm and even appends the parents of the the found item. I was just wondering if you guys had any ...
2
votes
2answers
43 views

How to improve this jQuery code for tabs

I'm quite new to javaScript and jQuery and wrote the following function to creat some dynamic tabs. I'd be very interested to know how professional programmers would improve this code. jsFiddle ...
0
votes
1answer
20 views

Create Custom Div with Parametric Contents [closed]

I'm new in JS area. I'm looking for a suggestion. This is my code: http://jsfiddle.net/bosbeles/r4Wra/2/ I want to create a method called createComment(user, comment, time) which returns a div as ...
1
vote
0answers
31 views

Help Improve this Code: Notifications Dropdown with TinyScroll

I'm relatively new to jQuery and am trying to learn best practices/design patterns with javascript. Came across this link (http://addyosmani.com/resources/essentialjsdesignpatterns/book/) and decided ...
1
vote
1answer
40 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
61 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
18 views

Razor Jquery Error [closed]

<script> @if (ViewBag.checkedArtikel != null) { foreach (int ac in ViewBag.checkedArtikel) { String temp = "'#addartikel" + ac + "'"; <text> ...
3
votes
1answer
51 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
36 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
76 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 ...
12
votes
8answers
1k 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
92 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 ...
1
vote
0answers
42 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
47 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
39 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
34 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
103 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
63 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
116 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
32 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
51 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
75 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
66 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
136 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
67 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
125 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
77 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
105 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
82 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
42 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
58 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
34 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
54 views

autocomplete jquery -renderItem- option

$(function() { function log( message ) { $( "<div>" ).text( message ).prependTo( "#log" ); $( "#grille" ).scrollTop( 0 ); } $( "#my_ac" ).autocomplete({ source: ...
2
votes
0answers
110 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 2 3 4 5 13