Questions tagged [jquery]

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

205 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
0answers
64 views

Created a paperfold like effect

I am trying to recreate a neat effect that I saw posted on Stack Overflow as a GIF . I am trying to recreate this with CSS and JavaScript and I have created a similar effect with a button press. I ...
4
votes
0answers
500 views

Bootstrap 4 Menu Collapse on Scroll

I am trying to code a menu that: Is horizontal on lg+ displays at the top of the page Shows a hamburger menu when the user scrolls from the top Will display as the collapsed format when the ...
4
votes
0answers
396 views

Client-side routing using Knockout and HTML5 History API for a single-page web application

The full question is... "Please, how can this code base or project (for client-side routing using Knockout and HTML5 History API) be further enhanced as regards security, production-readiness, ES6, ...
4
votes
0answers
87 views

Backbone learning piece, Movie Application using Views, Collection, Models, Routes and Localstorage

I have created a Backbone Movie app as part of a learning exercise, the app is hosted on codepen although I actually have it built on my local but thought this approach would be handier for code ...
3
votes
0answers
41 views

Optimisation potential when using deferred/promises and looping

I am fairly inexperienced when it comes to jQuery/JavaScript, so although the following code works, I am just looking to understand if my use of looping, deferred/promises etc could be optimised at ...
3
votes
0answers
35 views

Validating a file input whose value is reset to empty string (“”) after selection

My form comprises of a mandatory file input. The form is validated according to the jQuery validate plugin. The file input has attribute required so that the ...
3
votes
0answers
64 views

Dynamic dependent dropdown in jquery

I'm trying to create a dependent dynamic dropdown in jQuery, in which the number of dropdowns is not fixed. Let's say we've four provinces, each has cities, and each city has sections. Each section ...
3
votes
0answers
39 views

Displaying sections from pre-checked options

First off, not the greatest with jQuery but know enough to get by. I have a custom script for our WordPress site that ties in with a main plugin we use. I have a JSFiddle that gives the gist of what ...
3
votes
0answers
32 views

Prettified GridView: is this JS code concise?

I been writing code for my company for years and there is never any constructive criticism for what I do. I am the only developer here and I would appreciate your opinion on this web page I made. It ...
3
votes
0answers
90 views

Dynamic Bootstrap 4 modal using JavaScript OOP

I have created dynamic Bootstrap 4 modal using JavaScript OOP. Please verify and give your reviews how I can improve the code. I have passed four parameters to create a dynamic modal: ...
3
votes
0answers
197 views

jQuery animation tab slider

I'm a beginner in js and jQuery. I wrote animation tab-slider. But my code is bad. What should I improve? What should I do to make the code less cumbersome? ...
3
votes
0answers
48 views

Search feature built with jQuery AJAX

This is front end code for a search feature that searches for characters. It uses the users search query to return an array of matching characters, which then gets displayed in a search list for the ...
3
votes
0answers
594 views

jQuery Plugin, multiple instances/elements with different options

I was having some real issues creating a jQuery plugin that could handle multiple instances with different config options. I came up with this, but am not sure if it follows best practices. I used ...
3
votes
0answers
45 views

Image placement & animation from grid

I have a grid of different sized images. I made a click event function that grabs the image inside any clicked grid-item. It then saves the coordinates and size of the image and animates from the grid ...
3
votes
0answers
1k views

Todo list with drag and drop functionality

I have made a drag and drop todo list. I would like to hear If there is anything better I can do about this code. Here it is: ...
3
votes
0answers
131 views

JavaScript copy paste cell values

The following function gets the lastly clicked cell value and pastes it into the edit box editBox, in which the user can then edit the value. Whenever the user goes ...
3
votes
0answers
955 views

Flask site that uses x-editable to edit elements and update mysql db

This code is built in flask, it allows a user to edit a title and a description of a div. I have used the X-editable library which allows a user to edit text and use ajax requests. I also process ...
3
votes
0answers
34 views

Responsive layout for showing/hiding 4 panels

I have 4 panels that will contains tables for data. There will be instances where a panel will contain no data, so I have combated wasted space with the code below. I'm relatively new to both jquery ...
3
votes
0answers
72 views

jQuery plugin for a lightweight dropdown

I'm working on my first jQuery plugin for a lightweight dropdown. This dropdown behaves just like a ordinary <select>. Before implementing new features I'd ...
3
votes
0answers
112 views

jQuery modal dialog plugin

I'm working on creating a new jQuery modal plugin. I'm pretty good at jQuery but still pretty new to the whole object oriented plug-and-play style of plugins so I used a different plugin I found ...
3
votes
0answers
80 views

Showing the slide named in the query string and hiding the others

I have this all figured out now thanks to the help of a mod. Here's the working code: ...
3
votes
0answers
454 views

JavaScript Audio Player

Looking for feedback on any bad practices and general advice on how I might better structure my code. ...
3
votes
0answers
127 views

jQuery form change listener, modularized using ES6

I have the following javascript code that I'm trying to modularize using ES6: ...
3
votes
0answers
63 views

Displaying a list along with multiple event listeners

This is one part of my website, it fetches a list of habits from my Restful API. Each description of habit in list gets append to a list item in the HTML. During this loop, a event click listener is ...
3
votes
0answers
5k views

Simple minesweeper game in JavaScript

I created a simple minesweeper game as I am trying to get my hands dirty in JavaScript. I have tried to use the oops while doing this. I am posting 3 files: index.html minesweeper.js minesweeper.css ...
3
votes
0answers
78 views

Building HTML with JS (function expression vs comment for code clarity)

I'm currently building some HTML with JS (specifically using the jQuery library). My code is as follows: ...
3
votes
0answers
321 views

Appending script elements with variable attributes

eWay has a simple Pay Now button that is embedded as a script. There are other ways to use the eWay API to take a custom payment, but they are slightly more complicated and the idea was to keep it ...
3
votes
0answers
127 views

Ajax file uploader jQuery plugin

I tried to write my first jQuery plugin. It's a very simple Ajax file uploader. I would appreciate a review of this code. HTML ...
3
votes
0answers
387 views

Efficient JavaScript/jQuery typewriter effect that handles HTML5, entities, and text

How should this code be improved? For instance: How could it be shorter, clearer, deal with memory better, use a plugin/library, better prepared for web input? I can break up and clarify the regex or ...
3
votes
0answers
937 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
0answers
1k views

Wrapper for jQuery Ajax to ensure redirects occur on clientside - Round 2

A while back I posted Wrapper for jquery ajax to ensure redirects occur on clientside on handling ajax and redirects when a server side error occurs. Since that post I've been using this module ...
3
votes
0answers
4k 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 ...
3
votes
0answers
295 views

jQuery Plugin - HTML5 History State

I've built this small jQuery plugin to work with HTML5 History State functions. It's my first jQuery plugin, so I'm not sure if it's up to the best practices, or what could be done better. Keeping it ...
3
votes
0answers
5k views

Overriding sorter and matcher in Bootstrap Typeahead

In this code, I'm overriding the sorter and matcher for Twitter-Bootstrap's Typeahead functionality. The reason for the override is to allow state (technically Jurisdiction) abbreviations to be used ...
3
votes
0answers
2k views

File input control with rounded buttons and styled textbox

We have orange rounded buttons as a standard on our site. For our purposes, we switched everything over to use an anchor tag, instead of input type=button. The exception to this was the File Upload ...
2
votes
1answer
65 views

Wordpress Ajax Custom Query - High CPU LOAD

I'm developing a fully AJAX community WP theme that comes with a lot of custom queries. Everything is fine, there is no bug but recently but I had a few clients that have a huge database and my theme ...
2
votes
0answers
34 views

HTML Mark up for multiple Fridge Checks and jQuery to show specific Fridges

I am creating a report. Where a user can select a Fridge and submit their temperature values and comments. (Node JS will handle this). I'd like to see if I can improve anywhere with my HTML Mark Up ...
2
votes
0answers
21 views

Combine multiple jQuery click events and functions

I have a page with multiple menus. Once I hit a certain window width, I use CSS and jQuery to turn them into accordions. I also check the screen size when resizing so the accordions don't stay hidden ...
2
votes
0answers
1k views

Contact form with AJAX call and secured PHP with Google reCAPTCHA v3

here is a code of a simple contact form that I have created, I believe that the form is server-side protected against empty fields, header injections, CSRF, XSS, bots using 'Google reCAPTCHA v3' and ...
2
votes
0answers
61 views

jQuery validation for multi-page registration form

I use JS/JQuery validation for radioboxes, input field etc. Because of AJAX I use one global validation (in a separate file) and 4-5 other files to coverage actions in a relevant registration form ...
2
votes
0answers
24 views

jQuery code to display images served by PHP, without reloading

My php page displays a slider of images and when the user clicks on an image(.item), the div below (#team_single) changes the content without reloading the page. Content of the div changes also when ...
2
votes
0answers
48 views

jQuery popup menu function

I looked around for a script for popup menus in jQuery, but all i found were complex and largely-coded plugins. I decided to write a small script myself: ...
2
votes
0answers
197 views

Simple jumping game: continue with jquery or switch to html5 canvas?

I'm coding for fun with the secret ambition of making a fun little game for mobile. So I started out building this little jumping game with Javascript and jQuery. The game relies heavy on css ...
2
votes
0answers
24 views

Range value selector jQuery plugin

In need of making a range selecting feature I made my first jQuery plugin. I tried to mimic the structure from some open-source plugins. I wonder if this can be improved. Here is the source code: <...
2
votes
0answers
77 views

A simple “couple creator”

I just made this simple generator as a side-project to one big project I'm working on (demo on github pages here) and would like some opinions, feedback or suggestions on how to improve it. I hope you ...
2
votes
0answers
33 views

My navbar menu with two differents formats/styles

I have a navbar menu with two styles: First one is a tranparent menu. I use it when the page charges. Second one is a scroll and responsive (not yet) menu. I use jquery to transform the first menu ...
2
votes
0answers
37 views

Image slider code

I've been doing this image slider section, I've been working on this code for quite a time, the code is perfectly working but I want to improve it. I tried for hours and couldn't find a way. Maybe ...
2
votes
0answers
50 views

Controller to execute AJAX requests for a client

I have been developing this structure or pattern (I don't really know how to call it). It's my first time doing something like this, and I'm a bit worried about the future, if it becomes unmanageable. ...
2
votes
0answers
37 views

Remove General sibling on Keyup

I am creating a search filter using jQuery and implementing Array.prototype.filter(). What I have done is that I call the ...
2
votes
0answers
50 views

Display results from a JSON response based on game type

This code currently works with no errors. I want to know if there is a way to improve its conding structure, as there is a lot of repetition and it looks really bad. I tried an alternative way by ...

1
2 3 4 5