Questions tagged [jquery]

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

Filter by
Sorted by
Tagged with
1
vote
0answers
18 views

eCommerce Mock App

How do I implement the 'observe' pattern for the cart to regenerate html? So that, it will keep refresh its own. And any review on my coding style and code structure design? ...
-2
votes
0answers
21 views

I wanna know if my code is a correct way of OOP Php while using jquery

Now my question is this a correct way to code if i want to use OOP and also jquery to call functions i have 2 files the client side which has a ajax call to get data AddTicket,php ...
0
votes
0answers
11 views

Is it possible to optimise jQuery tag:contains() selector?

I am trying to extract all the elements from a webpage which contains given set of words. E.g. Given I have an array of random words ...
1
vote
0answers
14 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
12 views

Toggle submenu state on click, keydown and touch with a11y support

This code should toggle the state (open/closed) of a submenu when the associated top-level trigger is clicked. The menu should toggle for mouse clicks, keyboard events and touch events - since ...
1
vote
1answer
49 views

Simplifying input filtering in tables with multiple selectors using jQuery

Code explained I wrote a few identical functions for each table to filter them based on the user input typed in the input fields using jQuery. After filtering it counts the rows that are left visible....
2
votes
1answer
26 views

JQuery Class and Display Toggling

I know there is a better way to do the following but I havent had any luck trying to clean it up. This is for a table of messages where the user can click a row, ...
1
vote
1answer
51 views

Toggle CSS class on vote

I have this jQuery handled buttons. But I think I overdid it with the if else statements. I am wondering if the code can be more efficient in some way than what I ...
0
votes
0answers
18 views

Jquery tooltip with callback hover more tooltips displays delayed content

I have an html table with multiple rows and columns. ...
2
votes
1answer
52 views

Javacript/jQuery animation makes text appear/disappear as if typed

On Eric Amodio's website and JS.ORG, there is a Javascript animation which makes text appear/disappear as if it is being typed. I tried to replicate something similar but far more basic on JSFiddle. ...
2
votes
1answer
23 views

shopify get jquery code more readable, usable

Hi so like in my question, i wrote some part of code for shopify to get recent orders for past 30 day and i wondering if it is really readable, or maybe i schould change something? I mean maybe ...
1
vote
0answers
37 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" ...
3
votes
1answer
68 views

Sidebar with slide-out feature

I made a sidebar that has a slide-out feature. When you click on it, it shows more items. I made it with JS and HTML but I think the code can be done more efficiently. How can I clean the code up? <...
3
votes
0answers
37 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
1answer
51 views

Javascript Slider that controls TinySlider - feels inefficient [closed]

I feel like the main point of inefficiency is how I create "notches" and must loop through all of the created notches every time the value for the slider is changed. ...
2
votes
1answer
51 views

JavaScript list sorting by date and type. better code?

I'm a junior developer. And I want to learn the good way to code. The code I will show you is working, but I feel like its all messy and longer that it should be. It is simply a .js, a .html and some ...
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 ...
4
votes
0answers
163 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 ...
1
vote
0answers
23 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
22 views

Check if Radio Button is Checked and if Value Matches [closed]

Wracking my brain trying to figure this out. I'm not the greatest with Jquery but know enough to kinda get by. Right now I am trying to develop something that will check if a radio button in a group ...
1
vote
1answer
92 views

Generating a table of contents with collapsible subsections, PhP or JQuery?

The code below generates tables of contents with collapsible subsections from HTML headers. I have done it for a WordPress website, so I can use either PHP or JQuery/JavaScript. I have used PHP to ...
0
votes
0answers
27 views

Little Multilanguage site with modifiable words in a table.( Code improvement )

I have written a code for my little little website to make it multilanguage. It is a simple "developer" page where you can select from four different languages. Hungarian, English, Deutch and Roman. ...
2
votes
2answers
46 views

Find size for elements to fit in certain width

This is a follow-up on Change size of elements until parent reaches certain height The goal of the function is to find a size for the elements inside a parent, so they all fit in a single row. I ...
1
vote
0answers
524 views

How to open an input file programmatically (javascript) in a reliably way? [closed]

How to open an input file programmatically (javascript) in a reliably way? The most modern versions of internet browsers prevent the opening of input files programmatically (javascript) under certain ...
0
votes
0answers
15 views

Embedding BBCode tags in each other using checkboxes

So a few days ago ago I had this idea to let the user easily merge BBCode tags, like with checkboxes, as it is done in the code below. For a while I was thinking how I could make it work, then I came ...
0
votes
1answer
28 views

Jquery Selector optimization for multiple clicks

I have multiple inputs that each one has an increment and decrement button The buttons will be pressed multiple times so i am looking to optimize my selector: So should i keep the first one (which ...
2
votes
1answer
68 views

Improving the speed of loop in javascript for objects

So I have a loop that works great, but doing some testing I notice it is a bit slow. I get an average time within the loop of about 0.11 seconds. Include that with some arrays containing a length of ...
5
votes
1answer
103 views

Video player UI in Javascript/JQuery

I am a Javascript/JQuery beginner working on my first ever project. Everything in this program is working as it should and I am happy with its performance. I have pieced it together from a variety of ...
6
votes
2answers
153 views

Turtle Doodle (my first web app)

Turtle Doodle presents several panels which arrange themselves responsively. There is a canvas where the Turtle will move, leaving a paint trail behind him. A control panel allows various commands to ...
7
votes
2answers
175 views

eCommerce Mockup App in JS

I have completed this mockup eCommerce app using Javascript. This version can add products into a shopping cart and automatically calculate the order summary in the shopping cart. It can also delete ...
1
vote
1answer
42 views

How to splits blade files that contain javascript? [closed]

I have these scripts ...
2
votes
1answer
52 views

Add or remove a class on two elements when two different events fire

I want to add/remove a class on the html and body tags in the dom when my nav menu is opened or closed. Is this the most optimal way of writing this logic? ...
1
vote
0answers
32 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
51 views

Simple jQuery calculator [closed]

I am building a simple calculator with jQuery. I can append the value to the screen and when the user clicked the operator the first values are clear or empty. My question is, how can I store first ...
0
votes
0answers
20 views

Sorting, filtering and searching a list using jQuery

This is my first time writing so much jQuery, and because of the amount of content on the page, I get a lot of the following console warning in Google Developer Tools as I'm changing filters: [...
3
votes
0answers
50 views

JS PHP insert data in database - is it secure enough?

I'm working on a webapp and I'm using js/php (php and jquery latest versions). Is there anything I should do to improve security? I'm not super worried about safety as the current users are using a ...
2
votes
0answers
676 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 ...
3
votes
1answer
73 views

Ajax function with a callback

I have Ajax function with a callback which fetches all the Patient data however I have some perfomance issues and trying to figure out what it might be, does anyone have idea? That's my Code ...
2
votes
0answers
54 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
17 views

jQuery - Etch-A-Sketch implementation [closed]

How could I make my code follow the DRY principle? I feel like they are better ways to do things in my code. So any feedback will help me! js fiddle: https://jsfiddle.net/fr6ut238/ ...
1
vote
1answer
49 views

JQuery Selector in Vanilla JS

I've decided to reproduce the JQuery selector - specifically for finding elements by class name, ID, and tag So for example the tests could be written like ...
4
votes
2answers
188 views

basic jQuery plugin template

I would like to know if I'm writing a plugin for jquery correctly. I followed the official guide and also added some tweaks that I've found from various sources over time. While this works perfectly, ...
1
vote
0answers
54 views

Fills inputs of form

...
3
votes
0answers
70 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: ...
1
vote
1answer
32 views

Thoughts on using curly-brackets-less while loop with a try/catch? [closed]

I need to fetch data from an server that isn't always reliable and unfortunately fixing that is out of my hands. My team determined we would attempt the request up to 3 times. So I thought of using a ...
5
votes
2answers
281 views

Crystals Collector game with four clickable buttons

I'm a few weeks into javascript and had to make a simple "crystals collector" app. The app works as intended, but the code is obtuse and repetitive. I'd like to make the app work using just one on ...
2
votes
1answer
66 views

Toggling a class in JS

I'm toggling the class of an element with this code but I'm pretty sure it can be written more efficiently. ...
3
votes
1answer
40 views

Simple Form Starts Long Running Task and Watches Progress

Want to level up my skills. It hits a php script that starts a long running export that can take few minutes to few hours. The export script outputs a progress file that this form's javascript uses ...
2
votes
0answers
23 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 ...
3
votes
1answer
66 views

Whitelist for textarea and save input to file

I'm working with product codes, so a user can only scan these type of product codes into a textarea. I don't know if my code is written the best way possible, or has good performance. I'm using a ...

1
2 3 4 5
47