Skip to main content

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
1 answer
72 views

Calculate Prime Number using web workers and Web storage in HTML5

Take a number input (less than 100) from the user and save it to the web storage. Create a web worker to increment the number till it becomes prime. Provide two buttons of 'Start' and 'End' to start ...
user283073's user avatar
4 votes
3 answers
165 views

Get the contents of a table cell for all selected rows

I have a table of user info. When you click the button, I want to get the email address from each selected row, output into a comma-separated string. I got it to work with the following code, but I'm ...
LBF's user avatar
  • 143
1 vote
2 answers
157 views

Rubik's cube scrambler with timer and list of solves

This is a work in progress Rubik's Cube scramble generator with timer and list of solves. The list of solves is stored using localstorage so that it stays on page reload. A solve can also be deleted ...
HTMLNerd_1's user avatar
2 votes
1 answer
73 views

Reorganice (and style) form's output in HTML using JQuery: how to do it better?

To clarify: The code in "What I achieved" is working. I'm looking for suggestions so I can improve. I'm quite new with JQuery (and javascript) and I've been learning while styling a forum. ...
Lucas's user avatar
  • 21
1 vote
2 answers
78 views

Changing every link on page, in fastest way possible

I have created a script (mediawiki gadget), which iterates over every redlink in a rendered wiki-page (that is, over every href with class new, signifying an ...
philo math's user avatar
0 votes
2 answers
168 views

jQuery + PHP Form Submit and Refresh

Code below successfully processes and submits data to database. Is there anything else that needs to be included / considered? PHP (note-process.php): ...
Matt's user avatar
  • 9
0 votes
1 answer
142 views

Generate HTML from input fields

I am building a small tool to generate a copy and paste HTML block, based on the user inputs. In the HTML file, I have all my inputs (select, checkbox, text inputs etc). I based myself on the JS of an ...
blogob's user avatar
  • 101
1 vote
0 answers
48 views

Display tags on the page coming from the server

There is a site with posts that have tags. The site has a search for these tags, that is, you enter words / letters separated by a space and tags are displayed for you by matches. These tags can be ...
gglin's user avatar
  • 11
1 vote
1 answer
129 views

Sign Up Page - A mini Frontend Project

I have designed a a small frontend project, a sign-up page. It uses HTML, CSS, JavaScript and jQuery. Being a beginner to frontend development, I want to adapt to all the best practices. I am looking ...
Ultimate's user avatar
  • 143
2 votes
2 answers
911 views

Clone Div and change input control

I am using keypress to get all the events of a input control. Once the user hits the enter button after I am then clone a div and update the ids. One project I am having is that I only want to do this ...
Jefferson's user avatar
  • 353
1 vote
0 answers
632 views

Select product variations using buttons/swatches instead of a dropdown

In WooCommerce, by default interface, selecting product variations is possible through a dropdown. But, I am developing a site where I wanted buttons/swatches instead of the dropdown. I achieved that ...
Chotu Kaalia's user avatar
0 votes
2 answers
2k views

JQuery fixed header that hides on scroll down and shows on scroll up

I am currently working on a site product where I have to create a site-header that is always fixed on top of the viewport but when I scroll down it hides, and again when I scroll up, it becomes ...
Chotu Kaalia's user avatar
1 vote
1 answer
240 views

Chrome bookmarklet to expand examples elements on a dictionary webpage

I created the following Chrome bookmarklet to open all elements with text Extra Examples boxes on this page. For example - the element labeled with text Extra Examples below can be clicked: When it ...
Mori's user avatar
  • 83
2 votes
1 answer
164 views

Building HTML in JS and append

I am working on this project where I need to building html from this object. There a a lot of loops and counter and wanted to see if there is a better way to do this Any suggestions/comments are ...
Jefferson's user avatar
  • 353
0 votes
1 answer
415 views

Using localStorage to set and get values for date fields

My input fields for the dates are not saved when the User presses the submit button. The page reloads and the values for the input fields are empty. So I'm using localStorage to save the values when ...
JThao's user avatar
  • 37
0 votes
1 answer
381 views

Calculate multiple form field values as you type

I'm making a down payment form where the user enters a purchase price and can then enter the amount they want to pay as a down payment as either a dollar amount, a percent down or by using a range ...
Junky's user avatar
  • 163
0 votes
1 answer
84 views

Build JS object that will be pass into the Handler [closed]

I am working on a web page where I am creating a JS object using {} and []. This object is passed into a handler. I wanted to see if there is a better way to create the object in JavaScript My logic ...
Jefferson's user avatar
  • 353
2 votes
1 answer
806 views

jQuery code to add / remove classes depending on the button clicked

What the code does What the JQuery code does is add / remove classes on div's elsewhere on the page, depending on the button clicked. Button 1 clicked → add class ...
Tristan's user avatar
  • 21
2 votes
1 answer
170 views

Creating object in JS that is passed into IHttpHandler

I am working on a web page where I am creating a JS object using {} and []. This object is passed into a handler I wanted to ...
Jefferson's user avatar
  • 353
3 votes
1 answer
537 views

SetTimeout to populate Javascript Object while a function looped AJAX requests to get data

I wrote some code that will get the name and data of a node or multiple of nodes and put them in an object (seriesData) so I can use said object for a chart (renderChart). I used setTimeout() so ...
Bewarden's user avatar
4 votes
1 answer
538 views

Setting all hidden fields based on id

I am working on a web page where there is a checkbox with a value and a hidden field. I want to ask your opinion on whether this logic is sound. My logic The checkbox has a value that matches the id ...
Jefferson's user avatar
  • 353
2 votes
2 answers
228 views

validating form before uploading files

This function below return true/false. How I could possibly improve the code quality? ...
Jefferson's user avatar
  • 353
0 votes
1 answer
66 views

Show/hide depending on ID and Class

I have written some code that shows a div class, based on what ID is clicked. I'm a beginner, so not sure how to make this code compact, it seems way too long at the moment. Can anyone suggest a ...
Liv Strawbridge's user avatar
1 vote
1 answer
68 views

Convert filter button from plain Javascript to Jquery

I have the following function written in JS: ...
evilgenious448's user avatar
0 votes
1 answer
51 views

jQuery building select control

I have this logic that I wanted to see if there is any better way to build this select control. I am using the includes to look for data in the array and then I ...
Jefferson's user avatar
  • 123
0 votes
1 answer
155 views

Upgrade security and code quality of a website contact form

I have a simple website contact form created back in 2017. The form was developed using PHP, PHPMailer, jQuery, HTML and CSS. I would like to make sure the code is up to modern standards and secure. I ...
Michael Benjamin's user avatar
2 votes
2 answers
107 views

Javascript convert number string to Boolean

I'm making this control toggle between hide and show base on the value in this hidden value. I wanted to use a Boolean because I ...
Jefferson's user avatar
3 votes
1 answer
369 views

Javascript array from IP address

I want to make this code better. It works now but I think it can be better. I have a working sample on jsfiddle. When the page loads I have the End IP Address disable until the data is entered. Then I ...
Jefferson's user avatar
4 votes
1 answer
95 views

Four HTML tabs elements, with fade animations, activated by buttons

I am pretty new to Javascript and trying to make a really simple tabs element which is just hiding and showing sections depending on which button is clicked. I know that this is a terrible way of ...
RobDeadFreight's user avatar
2 votes
0 answers
75 views

A simple recipe page in HTML, SASS and JS

I've been learning how to design responsive webpages. I got done the basics and can create code that closely resembles the design, but I was wondering what are the best practices in web development ...
smanna's user avatar
  • 121
1 vote
0 answers
196 views

Split columns moving in the opposite direction when scrolled - in a continuous loop

I've seen something similar and have been trying to refactor the JS. I have two columns of content, which when scrolled move in opposite directions. This should also loop continuously. The ...
Stephen's user avatar
  • 11
2 votes
2 answers
81 views

JS Menu Post Get method

I have this JS ajax GET that returns menus to be used in a view. I wanted to see if there is any more way to write this method. Its a lot of code and just wanted to make sure there is no better way to ...
Jefferson's user avatar
  • 353
3 votes
2 answers
323 views

PHP blogging application with AJAX loading

I have been working on an online newspaper/blogging application with CodeIgniter 3.1.8 and Twitter Bootstrap 4. The latest feature added is lazy loading of posts. From the Static_model (...
Razvan Zamfir's user avatar
1 vote
1 answer
30 views

A more elegant way of adding option data to a dropdown box using jQuery

The code I have below is currently what I am wanting to see if I can shorten. The code works as-is right now but I don't like the face that each IF statement has its own $each loop in it. ...
StealthRT's user avatar
  • 147
0 votes
1 answer
200 views

Building user friendly inputs on a mobile device

I am working on an e-commerce website. The home page has 2 inputs: Looking for and Location. The user would enter their desired product and location and click on Search as shown below: The first ...
Hooman Bahreini's user avatar
2 votes
0 answers
73 views

Chess quiz web site

I'm working on a personal project to build a website that quizzes users on chess opening theory moves. I know my code is not very object-oriented but I am working on refactoring it right now. I just ...
jawncopper's user avatar
1 vote
0 answers
95 views

Here's my attempt at a Volumetric Weight Calculator (in cm). How did I do?

So, I've written this small calculator for computing the volumetric weight of a parcel. I've been trying to kick some bad habits to the kerb lately so I was wondering if I could get a code review. ...
Lewis's user avatar
  • 111
0 votes
1 answer
275 views

HTML table with repeatable rows and live-calculated column totals with row grouping indication

I created a quick "demonstration of proposal behavior" tool for my post on MSO: A proposal to put ALL answerers on a path to curating better content. Because I have never asked for a review ...
mickmackusa's user avatar
  • 8,674
3 votes
0 answers
90 views

Splash screen library in jQuery

I have created a splash screen library in jQuery. The splash screen will display until the website has completed loading all the images. I just wanted to review if there are any improvements. Here is ...
Ghost's user avatar
  • 185
3 votes
2 answers
1k views

Show/hide for multiple IDs

I'm don't know much about javascript, but and slowly learning through using other people's code. The below code I'm using is quite repetitive, with the only variance being the ID names. I feel like ...
Liv Strawbridge's user avatar
2 votes
1 answer
212 views

jQuery: Scrolling down into a content

I got tasked to develop an accordion-like function for a webpage. The header will always be visible, while the main content (and footer) be styled as display: none;...
Omar's user avatar
  • 123
0 votes
2 answers
107 views

Reload control using loop

I created this working sample and the code is below. Any advice on how to make this code; cleaner, more effective, just overall better! The data is coming from an API and I need to parse, select the ...
Jefferson's user avatar
  • 353
4 votes
1 answer
125 views

HTML <ruby> elements word spacing using jQuery

I'm doing a hobby project for fun recently, it's a GitHub webpage using Jekyll. One of the main component of my site is displaying Chinese characters with their Sino-Vietnamese pronunciation. I use <...
simplyPTA's user avatar
  • 181
0 votes
1 answer
27 views

Check Three Dom Elements to See if they are empty or not and return detailed result

I am checking three elements on the DOM to see if they are empty or not so that I can run only the Ajax calls that I should run and save on overall bandwidth. The code works but it "smells bad&...
Tyler Lazenby's user avatar
1 vote
1 answer
93 views

Web-site navigation bar

I'm just starting to learn website coding with html, css, and JavaScript. To get a bit of a hang for it, I'm trying to build a complete web page. So far, I've only done the navbar. I started with a ...
AlexanderSplat's user avatar
0 votes
1 answer
37 views

How can I have jQuery code further optimized?

I would like to see if my code below can still be optimized, resulting in lesser lines of code. My code retrieves the values from a multiselect field and assign them to hidden fields that will be ...
CodeForGood's user avatar
2 votes
0 answers
45 views

Copy the reply button to each comment thread in WordPress. Converted from jQuery to JavaScript

I converted an old Wordpress Plugin of mine from jQuery to plain JavaScript using a cheat sheet. I was very surprised that it seems to work right out of the box on my first try. ...
Marc's user avatar
  • 121
1 vote
1 answer
124 views

Selecting multiple checkboxes to show similar but different boxes

I have 3 checkbox's with 8 different combinations and outcomes. Selecting no checkboxes shows no divs. Selecting one checkbox shows the colored div. For example; clicking the red checkbox. Selecting ...
Lowis's user avatar
  • 21
3 votes
1 answer
168 views

Submitting form jQuery checkboxlist

In my requestForm submit function I have this logic that checks three checkboxes and then displays the label with an error message. Is there better logic? I would be happy for any kind of feedback ...
Jefferson's user avatar
  • 123
0 votes
2 answers
43 views

Simple terminal style message logger

I have a short function written in JavaScript using jQuery which takes a message and appends it to a div. It does this one character at a time with a small delay between characters, and then returns ...
Julian Lachniet's user avatar

1
2 3 4 5
47