a JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development.
2
votes
2answers
32 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
19 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
19 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
37 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 ...
-1
votes
0answers
11 views
Check departure and arrival destination and show fare using jQuery [on hold]
Hi i just want to create a form which contain two select tags which are using for select Departure and Arrival destination, i just want to select those two cities and want to display fare of that ...
0
votes
0answers
34 views
Newton Color Disc [on hold]
I'm trying to create a working example of Newton Color Disc with HTML, CSS Animations, jQuery and RaphaëlJS.
I was successful in creating the demo by making the sectors of different colors and ...
2
votes
1answer
19 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
24 views
How to set aria-hidden attribute on JQuery Show/Hide functions [on hold]
I need to change(set if not exist) aria-hidden attribute when call JQuery Show()/Hide() finctions.
This is showHide function from JQuery 1.9.1
I added only 2 lines of 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 ...
-4
votes
0answers
12 views
Need help making jQuery Transit transition repeat [closed]
Here is my code: http://jsfiddle.net/de74ezo5/14/
So what I was trying to achieve here was to make the pink header collapse and stay fixed at the top of the page after scrolling past the top red ...
3
votes
1answer
67 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
56 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
51 views
-2
votes
0answers
9 views
3
votes
2answers
48 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
29 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
176 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
53 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
94 views
Increment a text field value
So let's take this code which increments a Javascript text field value:
...
3
votes
5answers
44 views
1
vote
1answer
29 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
50 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
28 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
...
0
votes
0answers
57 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
69 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
41 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
19 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 ...
3
votes
2answers
52 views
Adding markers to a Google Maps map from a source
I decided to make a simple project to learn the Google Maps API. I'd appreciate a review of the code below. I'd like to know what I did right and wrong.
The code pulls data from one source and adds ...
4
votes
1answer
66 views
Flood game implementation
There is the implementation of flood game on my GitHub.
The app.coffee is the main part of project:
...
0
votes
1answer
44 views
jQuery hide and show option value from a dropdown
I have form with an "add field" button that does an Ajax call to add a new field.
Each field contains a list of options to choose from. When is public is Yes, I ...
0
votes
0answers
33 views
Switching pages with css3 and jQuery
I am trying to implement a custom page switcher.
In this fiddle I succeeded in doing what I want.
Do you think it can be done in a better way, above all performance wise?
For example, on iPad (first ...
0
votes
0answers
26 views
App using JQueryMobile and Cordova
I have received a project that is built on Cordova with JQueryMobile. The app is already published on three platforms and is being used by 100K+ users. Now I have to add new functionality in it. But ...
5
votes
2answers
84 views
Reducing code for animation of expanding menus
I wonder if I can reduce the code to optimize it better?
...
3
votes
1answer
57 views
Database of Pokemon
I've just started to write jQuery and have just written my first code using ajax calls.
I'm fetching data from the pokeapi and am using it to random generate new pokemon.
I have refactored it as ...
2
votes
0answers
72 views
Loading screen animation
I am trying to make a loading screen but my code isn't DRY. How could I make it DRY? I have thought about using CSS3 keyframes but I might have problems cross-platform.
...
2
votes
1answer
117 views
Toggle-item inside a Bootstrap dropdown-menu
I have this working code for a toggle-item inside a Bootstrap dropdown-menu. See demo here.
I suspect that it should be possible to improve it :
in order to have a shorter code and avoid all the ...
3
votes
1answer
44 views
Dynamic “filtering” list using jquery
I'm building a list of filters for a website user to filter on, such as a product category page. I'm giving the user the option to filter on brandname, model name, or gender.
To avoid serverside code ...
6
votes
2answers
117 views
Check image dimensions, calculate aspect ratio, set image dimensions, resize
I have created a set of functions to calculate the aspect ratio of an image, set a height/width on document.ready and on ...
4
votes
1answer
51 views
Checkbox multiselect user interface
I wrote a small multiple select interface in jQuery, and I'm looking for any feedback on code quality/usability.
It has to do the following:
When check all is checked, all boxes must become checked
...
2
votes
1answer
49 views
Merging nested tables into a single table
I made a function that merges nested tables into a single table.
The following function converts the headers. It takes an old table that has nested tables in its rows, takes all the headers of these ...
3
votes
1answer
36 views
Changing a video link when hovered
I have three divs that change a video link when they are hovered. I have the code working in three different blocks but I am not sure how to combine them since it is very repetitive.
...
0
votes
0answers
34 views
Keeping variables in scope with JS Module Pattern and Jasmine
I am looking for some pointers/feedback on how to write better modules and simple tests.
This is a simple module which displays (unfortunately an infame for now — yes I know it's bad) the user's cart ...
2
votes
0answers
81 views
2
votes
1answer
176 views
Call html() on two jQuery selector objects
In my webpage I have two places where I need my JavaScript to write dates. How to do it in one go?
Selectors:
...
5
votes
1answer
47 views
Clearing and Loading Data on HTML Form Fields
What I'm trying to do:
I have a single bootstrap modal which contains a form that I'm using to ADD records and at the same time UPDATE.
What I have:
A two buttons to SHOW this modal that calls a ...
0
votes
2answers
20 views
Adding cells to a table
I'm calling the below 2 function once per Cell in a table with over 135 columns and over 200 rows (that is 134*200 = 26800 times, I'm not running the functions on ...
4
votes
2answers
129 views
Get <TH> texts into a tab separated string
table_with_headers = $(this.dom.table).find("thead tr th").map(->
$(this).text()
).get().join("\t")
Can one write it nicer? I especially dont like the inner ...
4
votes
1answer
37 views
Select the one table before my link
I need to select the <table> before the table where the link I clicked. I can't use IDs, because I don't want to edit my jQuery every time I add a new table.
...
1
vote
2answers
97 views
Loading div sections from separate files
I am loading divs from separate HTML files into a div on the index.html page.
This is being done using jQuery's ...
42
votes
3answers
1k views
Celebratory fireworks animation
To celebrate an important event, I hastily cobbled together an HTML canvas-based animation.
A few concerns I have include:
Performance: Does it run reasonably smoothly on most modern machines? How ...