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

Live update calendar

I've made a calendar using a Firebase database so that it live updates. I'm pretty happy with it but I feel like restructuring it to fit the MVC design pattern, however, I've never done anything in ...
1
vote
1answer
25 views

Best practice of HTML DOM template in javascript

Of course the when this select is comes with less options it will be better to leave it like this, and when it comes more then this it better to make it via loop. The question is that if I should make ...
3
votes
1answer
22 views

Responsive Navigation

The following responsive navigation on JSfiddle works well, however I am just wondering whether there is any way to improve what I have done. I am new at JQuery so all help appreciated: JSFiddle here ...
5
votes
1answer
40 views

Simplifications to Miller Columns

Background Unsatisfied with existing implementations of Miller Columns (used to edit hierarchical data), I decided to re-invent the wheel. Problem Most of the existing implementations are too ...
-1
votes
0answers
9 views

Jquery flow model like tree view [on hold]

Hey I want to make drag and drop tree view structure , but I stuck in some major problem after drag the list (menu) I want to drag one more element on same element a to create flow ( Parent drop ...
1
vote
1answer
51 views

Displaying data from JSON in a table

What do you think of my code? I know it is a little rough around the edges but as of two days ago I had no idea how to use jQuery or JavaScript. ...
0
votes
0answers
32 views

Is there a better way to make a conditional second call than using deferreds like this? [on hold]

I need to make one ajax call, then based upon what's received possibly make another. Is there a better way to user jQuery deferreds than what I have here? ...
3
votes
2answers
63 views

Remove, Append, and Resize Using jQuery

I'm trying to essentially replace an element and make it transition smoothly to the new size... I started off trying to work with the appended element itself, but the padding and margins made that ...
1
vote
2answers
44 views

Is this system of text protection reliable?

I've got a text I don't want to be copied by users. To avoid that, I'm using this code: index.php ...
3
votes
1answer
39 views

Dynamically changing available select options

I have the following code working here on JSFIDDLE: ...
0
votes
1answer
15 views

Make sequential fadeIn() promises more manageable

I've two versions of promise code. The page is a simple one - an unordered list with a few items. I am trying to make the items show up (fadeIn) one-after-another ...
2
votes
2answers
122 views
4
votes
3answers
217 views

jQuery duplicated selector

$("#colors_added").html(parseFloat($("#colors_added").html()) + 1); This JS line makes my IDE go Duplicated jQuery selector ...
2
votes
1answer
33 views

GIF background rollover

I made a cool roll-over in CSS which displays an animated GIF when the parent is hovered. Codepen The problem is that I will have about 40 .day like that, all playing the animated GIF behind the ...
3
votes
2answers
40 views

JavaScript/jQuery string handling

Recently I wrote some code to take two arrays of data and create a title. Each array could have 0-n elements. However, the multiple if statements seem messy to me. ...
0
votes
0answers
21 views

How to make this JQuery script more reusable [closed]

Any thoughts on how to make this script http://jsfiddle.net/BobanStanojevic/7p392tkt/ more reusable and ready for general implementation. Thanks
6
votes
1answer
314 views

Restricting user to one open tab in browser

I had a requirement to restrict my web site's users to just one open tab in the browser. I am aware that this is not the best thing to do in terms of general user experience guidelines but its an ...
2
votes
2answers
69 views

Common function to check if an element exists

I think there is more that is needed here. Can someone please comment on it? What I need is to add some common functions to check if an element exists. ...
-1
votes
0answers
15 views

PHP or Jquery code to parse a string [closed]

i need to parse following string using php or jquery. ...
2
votes
1answer
44 views

Clarification on jQuery global variables in external files and scope

Now that I've used it a lot, I think I'm starting to get the hang of jQuery and its capabilities. One thing I'm still unclear about is how global variables are initiated and used, and when the ...
4
votes
2answers
82 views

Calculator using PHP with logging to MySQL database

I have made a calculator in PHP and I need some feedback in terms of security and performance or any other general improvements. You can download a zip file with all the contents from this link if ...
4
votes
3answers
167 views

Simple image gallery

I have a simple gallery that hides and shows images. It works fine, however, I am not satisfied with my approach, and my code seems redundant. Can you check my code and give a better idea on how I can ...
-1
votes
1answer
63 views

When a radio button is clicked, disable some search fields

The table has 4 search types and 4 radio buttons; when one radio button is clicked, other fields should be disabled. The JavaScript code seems repetitive. How can I improve it? JavaScript ...
3
votes
2answers
31 views

Insert JSON data into rendered template after AJAX call

I have an already rendered template and I want to update it with some JSON data I obtain via AJAX. The template as it is before rendering looks like this (using ...
3
votes
1answer
28 views

Secure authentication using JavaScript module pattern and an AJAXified modal window

This code is not live, but for brevity I'll write as though it is. When a user clicks any element with the class name js-modalOpen, for example: ...
1
vote
1answer
47 views

Better way of clone and then replace some attributes with jQuery

I have HTML code like this : ...
2
votes
2answers
57 views

Optimizing jQuery addclass / removeclass on scroll

I have a scroll event and add class and remove classes for different elements. As you can see the code is a bit big. Is this method ok or is there a more efficient one? I mean, you can see that there ...
6
votes
1answer
79 views

Navigation bar built from fetched JSON data

I have finally been able to create my little navigation plugin in an object-oriented way that reads the li from a JSON file. Now, is my code efficient? Especially, ...
2
votes
2answers
51 views

Change the navigation ul li based on the clicked country

I'm trying to create a very simple jQuery plugin in the object-oriented way. Now, I'm not sure whether the code I produced is correct and efficient OO programming. The plugin's aim is to change the ...
0
votes
1answer
28 views

My jQuery Form Plugin

Long story short, I wrote this jQuery form plugin as an exercise to better understand how other form plugins work. If you have any suggestions about how to improve this (or my coding style in general) ...
1
vote
1answer
31 views

Reusable library to alert user of potentially unsaved changes

I wrote a small reusable component based of some of the examples to this question on Stack Overflow about Activating OnBeforeUnload only when field values have ...
2
votes
2answers
51 views

Optimize jQuery image gallery for production

I can't seem to find a very simple light weight image gallery, so I decided to build my own. I'm not an expert in jQuery/JavaScript, so I was hoping some suggestions could be made to make this ...
2
votes
1answer
32 views

jQuery-Keyframes allows dynamic generation of CSS3 keyframes with callback events

I want to learn best practices for structuring these kinds of small jquery plugin libraries. I believe I am using a bad design pattern and what I was going for is fewest line numbers and minimal code. ...
0
votes
0answers
14 views

Changing the text of a button depending on the visibility of a table [migrated]

I'm trying to change the text of a button when a table is visible or not with jquery. The problem is that jquery .is(":visible") don't appear to do it. ¿What I'm doing wrong? I supposed that ...
3
votes
1answer
78 views

Refactored nearly identical HTML forms

I have two forms in my HTML page. Both share a set of input elements (not a part of any of the forms, but rather residing separately). Besides that, the forms have their own input elements as well. ...
4
votes
1answer
62 views

(Swedish) Calendar of the year 2015 using Firebase

I've made a calendar for the year of 2015 using Firebase for real-time updates when something changes in it. I'm quite happy with it but I'm interested in getting some feedback on my Javascripting ...
-1
votes
1answer
56 views
3
votes
2answers
58 views

Hide / Show panels depending of value of a dropdown

According to the value of a dropdown menu I have to show/hide two panels. For option 'derive' and 'reject' I should show the comment panel, and just for the 'derive' panel I should also show a ...
2
votes
0answers
41 views

Paper.js slow resize

I'm currently in the process of redesigning and coding my website, for which I'm wanting to use paper.js to draw on canvas. Currently the only project page I have is using a basic random ball ...
3
votes
2answers
195 views

Wrapping jQuery empty() To Include A Callback

I needed to write a method to extend the jQuery empty() function to include a callback. Since I didn't want to mess with namespaces, closures, etc, I instead wrote a regular function to wrap empty(). ...
1
vote
1answer
84 views

C# lambda expressions as array extensions in JavaScript

I use a lot of lambda expressions in C#, so I've decided to create some similar functionality in JavaScript. Since jQuery is included in my projects, I'm using ...
0
votes
2answers
110 views

Increment a text field value

So let's take this code which increments a Javascript text field value: ...
3
votes
5answers
46 views

Handing focusing and unfocusing of multiple form fields

Here is a link to my problem ...
1
vote
1answer
34 views

UI-slider widget

This represents a UI-slider widget - there are a number of different widgets on the page. This function is repeated per widget - 90% of the code is the same - the only difference being that each has a ...
1
vote
1answer
51 views

Add a class to an element when it's loaded

I want to add a class to only those <p> elements that have an <img>. So far this is what I have, it works, but I ...
2
votes
1answer
39 views

Row and Column input picker

I've created a simple picker which is going to be used to select the number of rows and columns when constructing a table. Here's the example: http://jsfiddle.net/tnn3qgvj/8/ HTML ...
-1
votes
0answers
88 views

Sticky navigation using jQuery waypoints

I have built a one-page website with a sticky navigation using jQuery waypoints. Now I just added a highlight function for the menu buttons for when the user scrolls to that certain area. However, I ...
4
votes
1answer
75 views

Custom marquee consumes a lot of CPU power

I've a code which applies marquee to certain elements by using the requestAnimFrame method. However, when I test my application on a lower spec PC (Intel Celeron ...
1
vote
1answer
47 views

More maintainable API for wysihtml5 widget

For an HTML calendar with jQuery, I put in event listeners to enable jQuery drag-and-drop that reads and writes to persistence using HTTP get and post with JSON structures. Now I'd like to make the ...
2
votes
1answer
21 views

Making empty cells in Underscore template

From the back-end, I am receiving 8 data. The client requires showing that the row per data is 7, so I have 1 data in balance. I have created empty data and made the empty cells, which works fine. But ...