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
2
votes
0answers
2k 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 ...
2
votes
0answers
2k views

Data with Handlebars templating function

In my app development, I need to fetch data from backed, and it needs to implement it into an HTML page. I've written the below code for this, but I think it's very lengthy. Can anyone give me ...
1
vote
0answers
44 views

I need some help in refactor or just simplify noob Javascript code

Need help to refactor this code to look like its done by a pro. Or just put some advice or links to useful stuff. The idea is to clone a div with two empty tables for two separate arrays of data. div ...
1
vote
0answers
22 views

User Friendly Comment and Answer System for SharePoint Site

I am seeking help in improving my question and answer system I developed for my office SharePoint site. The question and answer system features two-columns and in the each columns is a table. I have a ...
1
vote
0answers
15 views

Making Select2 pillbox control more accessible compliant and want feedback (bring your screen reader)

I am looking for feedback on screen reader improvements for the code/example below. The Select2 pillbox control needs to be more accessible. They have an open issues on this subject Select2 Issue ...
1
vote
0answers
15 views

Config based Hide Show Rules Processor in JavaScript

I am working on a library which does DOM hide and show based on other DOM elements. I have written a basic structure for the library. The below is the code to handle DOM elements hiding when a ...
1
vote
0answers
41 views

App that Builds a list of “targets” for a Text-Based RPG using the games' API

all! I am developing a web "app" with JavaScript and jQuery with the help of a couple of other libraries for ease of use. Its purpose is to collect user ID's and to build a list of "attackable" ...
1
vote
0answers
24 views

Display Correct Div based on Radio Button Checked

We are using a plugin for our WordPress website. I'm trying to add some custom code to it and finally got it working however it is ultra janky. The HTML is a simplified version of the actual site's ...
1
vote
0answers
36 views

Subscribe once and reuse the Angular Subscription each second

I am creating a web application using Angular 8. This application is all about talking to the stock markets server and getting the Live updates every second. I have one query here. Below is my code: <...
1
vote
0answers
54 views

Fills inputs of form

...
1
vote
0answers
57 views

Enable/Disable Popper.js tooltip if element exists

I would like to disable the popper.js tooptip if there is an element with a specific class on the page. Let me explain ... I have a plugin that creates notifications dynamically, these notifications ...
1
vote
0answers
43 views

Sliding marker on link hover and click with jQuery

The code I'm bringing forward is for a vertical menu, where I needed a marker to do the following: When hovering over a link the marker should slide down next to it. When not hovering over a link the ...
1
vote
0answers
27 views

jQuery plugin linked with dataTable

I have no problem, but I would like some advice: I've read some help to do some jQuery plugin, and I just did my first one. This plugin helps to generate dynamic datatable: Autofill the table with ...
1
vote
0answers
250 views

Load more and filtering - WordPress AJAX

In my WordPress theme I have built a function that uses Isotope Layout by Metafizzy to accomplish filtering and sorting. I have used a mix of AJAX and JQuery to accomplish this, however I feel the ...
1
vote
0answers
14 views

Collapsible left-side tree

I was wondering if there is a better way to write the following code? The code is working, I am looking for better technique to achieve the functionality, if any exists. Never mind the classes that ...
1
vote
0answers
24 views

jQuery plugin for allowing only digits to be entered in html form input

I wrote this small jQuery plugin to set some fields so that they allow only 0-9 digits to be entered. I intended to do that by preventing user from typing, pasting or dropping non-digit content. It ...
1
vote
0answers
55 views

Sorting options within a select element

I am trying to sort the options within a SELECT element. I wonder if I am doing it stupidly or not, so perhaps someone can look ...
1
vote
0answers
48 views

A Ruby on Rails controller and JS code to add labels to products, like Gmail's labeling tool

My friend asked me to write a tool that lets users bulk add/edit labels (taxons) to store (spree commerce) products. I came up with this, curious to know if you guys find the code readable/...
1
vote
0answers
27 views

Selecting rows on condition in a table

I have a table with courses. The user that is currently logged in can mark these courses as attended and unattended. There can be multiple rows selected. The logic for this row selecting looks ...
1
vote
0answers
114 views

Shopping cart to pdf generator

So I'm working on my website which is done though 3dcart, in their infinite wisdom for some reason I cannot work on anything to do with the backend (no database interactions or anything), so this is ...
1
vote
0answers
1k views

Slider that increased center slide width. (Slider plugin suggestions)

I wanted to create slider when it slide center slide width must have incresed and the two slide next to it stay on normal slide. I have tried one using slick slider. Here is the code pen link that I ...
1
vote
0answers
1k views

jQuery animate() and css() not performing well in firefox and internet explorer

I am making a webapp that needs a division to expand on click. (The division is loaded with content, so it was likely to not animate very well, but I increased the animation time to 1s to make it look ...
1
vote
0answers
47 views

Calculator comparing your inflation rate to the Consumer Price Index

This code works fine and outputs the expected result. It is a small part of a larger program I'm working on to calculate personal inflation. I feel there is a better or more elegant way do this. I am ...
1
vote
0answers
49 views

jQuery plugin to toggle a fullscreen menu open/closed

I wrote my very first jQuery plugin: open/close a fullscreen menu, using a toggle. I know a very little about object in JavaScript; I'm a PHP OOprogrammer. How to transform this plugin using OO ...
1
vote
0answers
69 views

Plotting neighborhood Yelp information on Google Maps

I have a project that I made a long time ago, and I was wondering how I should refactor the front end. This web app gets yelp data and displays it on a google map. I remember someone saying that html ...
1
vote
0answers
90 views

Populating a container with dynamic pairs of connected sortable lists

I am working on an application which is used to assign work to Operators based on the Category of the work. Each Operator has several Categories of work they are qualified to work on. They have a ...
1
vote
0answers
70 views

Reading Files in a File Manager Plugin for WYSIWYG Editors

I recently created a file manager plugin for the TinyMCE, CKEditor and Redactor editors to ...
1
vote
0answers
59 views

Passenger calculation UI logic

I need to shorten code, remove duplicate elements, and generally make a more valid code. My code works, but I think it is 'hardcoded'. How would an experienced programmer reduce this code? At the ...
1
vote
0answers
22 views

Floating Input Label with GreenSock

I created floating input labels, however, I don't think the way I wrote the code is the best way and seems redundant. For example I'm targeting the same elements more than once in different functions ...
1
vote
0answers
51 views

Creating Fancy Box w/ Input Carousel

Customizing Custom Options in Magento. See it in action - Click specify fixture just below the price on product page Ive styled the radio buttons using purely css. Is this the proper or most ...
1
vote
0answers
46 views

Javascript: Showing a modal with image when an image is clicked

I am currently working on a very small Image Gallery website. When I click on a given image, a modal window which contains it should be shown. Buttons previous, next are used to show previous/next ...
1
vote
0answers
156 views

React Bitcoin Exchange Single Page App

I've got a simple single page web app that's build with React. It fetches data from two different APIs, when they have been successfully retrieved, and the promise ...
1
vote
0answers
2k views

AJAX Calls within jQuery Loops

I have the following code, which is working (?), but I guess I can do it simpler and more elegantly. I need to invoke a method when everything is completed (channelsVideos array is filled). The ...
1
vote
0answers
48 views

Add Colour Tags on Click - Version 2

I recently asked a question here, where I was trying to implement some extra functionality into the tag-it plugin, where the user should be able to add tags to the input by clicking on them in a "...
1
vote
0answers
528 views

jQuery/HTML5 Finance Calculator

I have created a simple jQuery based finance calculator. Just to make it easy to read I will list below all the functionality and validation it has. Functionalities: Ability to enter the amount ...
1
vote
0answers
114 views

Draw directional flow on html5 canvas grid/checkboard with respect to user defined size and limits

Ultimately I want to be able to draw a checkerboard (wall) of user-defined size. This wall is made up of tiles of a user-defined size. This main wall can then be split up into multiple sections (...
1
vote
0answers
387 views

Eliminate render block on my bxslider

I am using the bxslider jQuery plugin as a welcome banner with a overlay (see image below for illustration.) This is however causing render block and cannot figure out how I can improve my code to ...
1
vote
0answers
102 views

Ajax Validation Handler

I'm trying to transition my app from a collection of server scripts to something that uses SOLID concepts. I'm stuck trying to figure out a better way to do ajax validation. I currently have a file ...
1
vote
0answers
86 views

Generate Personal Financial Report — to OOP or not to OOP php

I've developed a little personal financial web app in PHP/JQuery/MYSQL. The program currently does everything I need it to do, but I know that I'm an amateur coder. Looking for some help on cleaning ...
1
vote
0answers
134 views

jQuery custom slider

I'm new to jQuery and JS and have recently tried turning a working slider into a plugin for the first time for a small project. I would love some feedback, code improvement, optimization and any do's/...
1
vote
0answers
80 views

jQuery focus/blur pass variable cleanup challenge

Little bit of a challenge question. What I have works though I'm no JS wizard, wondering if anyone has a better/preferred way of doing what I'm doing? Basically, I want to dynamically set a variable ...
1
vote
0answers
228 views

jQuery plugin for dropdown with multiple select

This is my first time creating a jQuery plugin. As there are many tutorials for jQuery plugins, I'm not sure if my code correct. This is my first draft for my plugin, it is working but I haven't ...
1
vote
0answers
2k views

Zend Framework 3 Ajax Form Validation - contact form

I would like to present to you my code vision of Ajax form validation in Zend Framework 3. I am a beginner in Zend Framework and jQuery too, so I don't know that my solution is good and acceptable. ...
1
vote
0answers
670 views

Gradual color change on scroll

I'm a beginner who wants to learn properly how to write code. The following code takes initial RGB values and gradually changes them (shade by shade) to targeted rgb values, scroll by scroll. The code ...
1
vote
0answers
454 views

Pointer hover animation for a five-star-rating picker

I want to shorten my code. You can see the following code i used many function for addClass, removeClass. But it is not usefully. Can do my work in one hover function ? If yes can anyone help me ? ...
1
vote
0answers
475 views

JavaScript Wikipedia search using jQuery autocomplete

The goal is to query the Wikipedia API with a search, and present the user the autocomplete options based on an API call that shows possible Wikipedia pages when entering the search using the jQuery ...
1
vote
0answers
442 views

Populating an HTML table with JSON results

Could anyone suggest a better approach than the one I'm using now? I tried to keep it as minimal as possible, but this is the best I came up with. I did extensive research just to get to this point. ...
1
vote
0answers
30 views

Hovering elements in jQuery

I made this Fiddle with this code, though I'm not happy with it. Is there a better approach to achieve same result with cleaner code? jsFiddle ...
1
vote
0answers
801 views

Drag to adjust size of two divs

I have a browserify module I've made for resizing two divs I have beside each other. The idea is that I have two panes with a bar between them which I can grab and drag to resize the panes. As one ...
1
vote
0answers
282 views

Custom jQuery Lightbox

I wanted to make a custom lightbox, so I can easily change or add features. So far I got this. It works, with a few bugs, but I know the code is not clean at all. Also, I think a lot can be optimized ...