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
31 views

Update database, refresh the page to show changes, show a success message

Follow up question for: Update database, reload page then show a success message I have a table of articles, in each row is a button to activate / deactivate the ...
0
votes
0answers
19 views

slideDown slideUp - fadeIn fadeOut - ScrollTo [on hold]

I want to try and achieve this effect. I have a website 100% height. In the footer I have two buttons, contact and info. When you click one of the buttons the page should scroll down first then ...
0
votes
0answers
22 views

JQuery select and update data from database [on hold]

I send variable to AJAX for editing some data in table, but every time when I clicked in any rows JS receive my first clicks variable ...
3
votes
1answer
30 views

Set up event on class and initialize state [on hold]

Very similar to this question, I'm curious about common patterns/best practices for handling events in coffeescript classes, particularly when you also need to call the event handlers immediately to ...
6
votes
3answers
175 views

Refactor jQuery multiple click() event handlers

I'm using basic jQuery to render tab data. I was wondering if anybody could comment on how to refactor the click() event handlers, and any general guidance or advice. Here's the code/output in ...
1
vote
1answer
48 views

JavaScript eBay Listing Generator

I'm still pretty new at JS and, frankly, this is probably a little above my skill level. But here's my attempt at a script that will take user input and produce a custom interactive eBay listing. ...
-1
votes
0answers
10 views

Wondering why button is not executing code [closed]

I made a submit panel in the nav to submit files to a website I am currently working on. Dopeyemine.com For some reason the "Submit" button in the submit panel is not working. Please review the ...
2
votes
0answers
20 views

Ember.js file upload code

I am a newbie and tried to find the laziest way to do a file upload using EmberJS, jQuery and formdata (IE10+). The code might look stupid, but it worked. Can you please take a look and give some ...
1
vote
1answer
49 views

Better way to write 'bulky' function in jQuery

I have this function that works fine, but it looks really ugly and repetitive... Basically I have a featured profile and underneath I have 4 smaller thumbnails, on click I want to populate the large ...
3
votes
0answers
25 views

Dynamically create a table with values from an object

I want to create a table that looks like this: ...
3
votes
0answers
46 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 ...
3
votes
1answer
40 views

Update database, reload page then show a success message

I have spent a long time trying to find a way to do the following: Update a MySQL database with AJAX Reload the Page to show changes Show a success message I think I have finally found a way! ...
1
vote
1answer
38 views
2
votes
0answers
23 views

Activating image and video carousels

I am using this jQuery code to get two carousels working in bootstrap, and it's working for me. ...
0
votes
1answer
37 views

jQuery solution for a client's site

I'm in the process of working on a client's site. I have a section containing a ul with list items and a div containing the ...
0
votes
0answers
30 views

gallery.js with next/prev navigation and swipe function

This is a simple gallery script which I’m using in my website. The script is loaded in the body. (Everytime the user clicks a navigation-link to some page with a gallery, it is loaded.) I thought ...
1
vote
0answers
54 views
3
votes
1answer
63 views

Can this form validation be simplified made to memory leak free for all browsers?

I am doing a validation and I believe that there are many things that can be reduced or removed. I am still re-working this. But I am looking for some experts to look at my code and offer the very ...
0
votes
1answer
40 views

Checking number of of columns in a row

I have a own made grid system and made a jQuery function for that to check if there are not too many columns in each row. If so, ...
2
votes
1answer
50 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: ...
0
votes
0answers
20 views

What would be a better way to add a table to another table?

I was coding a plugin when I've noticed that there was probably a better way of writing this. ...
0
votes
1answer
38 views

Getting data from the server via JSON callback and parsing the data to HTML

I'm pretty new to web development with JS and was wondering if anyone can tell me how I can improve my code. I just feel like when it comes to maintainability my code would be very difficult to ...
3
votes
2answers
50 views

Optimize jQuery selectors code

I have this fiddle http://jsfiddle.net/L7zuT/ where I'm working on a small part of a big event program. The functionality is ok, the part of the problem would be the large JavaScript lines needed with ...
1
vote
0answers
19 views

Optimizing jQuery table building by replacing appends with string concat

I've wrote some code to create a grid of data, however depending on the size of the grid being drawn, IE8 shows a warning message about a long running script. I've read that multiple appends are a ...
2
votes
1answer
36 views

Writing my own jQuery plugin

I am trying to write a jQuery Plugin from a piece of JS code I had written. What this plugin does is it converts a select box into a map of Australia where I can select individual states. It's ...
3
votes
1answer
35 views

Personal Project for managing my Bookmarks - v2

I had asked earlier for review of parts of my JS file earlier and review of the complete JS file of my project. Now I have made changes as per the suggestions. Here are the files. I would like to get ...
2
votes
1answer
41 views

jQuery grid-system - handing different row widths

I made a function in jQuery for my home-made grid system. When a row has too many columns in it, it removes the HTML code from ...
2
votes
1answer
67 views

Refactoring a Instagram widget feed function

I've adapted a Instagram widget from this example so that it now appends 8 images to their respective IDs using a Instagram username. I want my widget implementation to be better and more efficient. ...
2
votes
2answers
88 views

Creating a function when user clicks on element to toggle another element

I use a lot of "when user clicks on element then another element will be displayed as visible/hidden... aka toggle". So I'm trying to make a general function to abide the DRY principal. Before ...
4
votes
1answer
67 views

Object Oriented vs Not jQuery & JS

I have taken a widget/ plugin that I wrote yesterday and just now it has been re-written in an object oriented format. It is certainly more code to write it the OO way, so please let me know also how ...
2
votes
1answer
127 views

Enabling/Disabling button on a certain condition

I am using a Telerik Datetime control. On onBlur event of input box I am checking if the date is valid/in-valid, based upon that ...
1
vote
0answers
39 views

JavaScript parameters - best practices for settings object/callback

I have the following function which runs as expected and is defined in the window object: ...
2
votes
1answer
42 views

Which mouseover handler is better?

I'm currently learning some jQuery and I am stuck on something. On a small exercise I did, I was asked to perform an action when you mouseover a div class. I gave a different solution than the one ...
4
votes
1answer
71 views

Personal project for managing my bookmarks

I am working on a personal project for managing my bookmarks, which is basically a web page to manage my bookmarks by categories. Managing here means everything - adding, viewing, updating, searching ...
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 : ...
0
votes
1answer
39 views

How can I refactor to avoid problems with function expressions (hoisting)?

The folllowing is a series of functions to ensure that various elements on a page line up no matter what window size or when the window is resized. However I'm not sure my code is very concise as I am ...
2
votes
1answer
64 views

Adding, deleting elements as per autocomplete results - updated

I am working on a Python/Django project which has turned into a JavaScript/jQuery project due to the amount of asynchronous functionality that I thought to add. There is a JavaScript file which is ...
0
votes
0answers
40 views

Validating a model and focus to the element if validation fails

I am using Backbone Marionette - I would like to set the user name and password if that passes the model validation method. I am highly confused with that. Please show me a handy approach or correct ...
4
votes
1answer
52 views

Driver License Input Form

I am willing to switch to OOP concept, but before working on that I would like to know whether what I have working so far is OK, or if any major change is required? For every form I create 3 files: ...
0
votes
1answer
41 views

Display AJAX response from PHP

I have used jQuery AJAX for my development. Below I have added example code for AJAX request and response. ajax.php ...
0
votes
0answers
39 views

Efficient way to reduce jquery code

I'm working on an application that has some repeating code. Wheneven I try to reduce this code it breaks. For example this code is repeating itself ...
0
votes
1answer
41 views

Restructuring multiple variables into an array

I'm using Groovy to grab properties from a page and each of the properties are grouped into a specific type: Groovy: ...
7
votes
7answers
769 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: ...
5
votes
1answer
28 views

Dialog multiple instantiations

I have a site where there are lots of "jobs" that a user creates. The user has the option to Close any given job. I want a pop up warning dialog whenever the user clicks the Close button, and verify ...
4
votes
3answers
91 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: ...
-1
votes
0answers
27 views

Scroll inside container

Is there is a way to make that code shorter or better? ...
3
votes
1answer
42 views

How do I generalize method which use Deferreds?

I've two similar functions and I want to use one generic function with two params, dialog and buttons. How do I do it? My ...
3
votes
1answer
69 views

Is this code efficient for multiple file uploads in jQuery?

I have this code which works for uploading multiple files (images), however, it seems inefficient due to having to a function for every single file upload (for 2 uploads but there will be about 12 in ...
1
vote
2answers
28 views

Series of repetitive content-loading functions

A friend helped me put the following code together. As can be seen, it's made up of a series of repetitive loadContent() functions. I've just shown the first two ...
2
votes
1answer
47 views

Refining/simplifying jquery for hiding and showing fieldsets

I'm starting to figure out this jquery stuff, but as you can see there's a long ways to go. How would I approach refining and simplifying this snippet. Its purpose is to show a fieldset...