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
1answer
14 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. ...
0
votes
1answer
85 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 ...
1
vote
1answer
145 views

Making a slideshow in JavaScript/jQuery

I am new to JavaScript and jQuery, and I would like to know what can be improved of the code in this slideshow. ...
0
votes
1answer
59 views

Optimize “layering” in jQuery

I am building an web application that is going to work in a similar way like photoshop or illustrator regarding layers. Here are my code that is searching the ".case" div for images, and then put ...
1
vote
0answers
35 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 ...
1
vote
0answers
11 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. ...
0
votes
0answers
13 views

Set cookie once modal opens on page scroll

So I am still learning a lot of things and wanted to see if someone wanted to look over my code and tell me if there are ways to improve things and maybe make the code a little cleaner. Here is what ...
0
votes
0answers
12 views

Stopping WOW.js animations from happening when the element is positioned before the current scroll position

I have been using WOW.js to animate my elements for some time now. I've noticed that when a page visitor reloads the page, animations that have already "been scrolled into view" by the ...
0
votes
1answer
31 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 ...
4
votes
2answers
186 views

JavaScript component to display ephemeral notifications

I would like to improve my code and organization of JS files so I'm wondering if you guys could tell me what I could do better. I've included a small but typical example of how I often use components. ...
3
votes
1answer
95 views

jQuery plugin to load a full-page view window

I have been writing a lot of jQuery plugins lately, but I don't really know if what I am doing is any good. Here is one of my most recent plugins. It allows the user to add a data attribute to any ...
0
votes
1answer
79 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 ...
1
vote
1answer
7k views

jQuery toggle class and content on click of link

The following code is working exactly as it is expected to work, the thing is that I'm sure that it can be written in a more efficient and less verbose way, any reviews? JavaScript: ...
1
vote
0answers
22 views

Mix JavaScript debounce (not plugin) with jQuery event handler?

I asked this on StackOverflow and was directed here... Instead of including a debounce plugin library for a very small form section of my site, I've implemented some of David Walsh's JavaScript ...
4
votes
1answer
51 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 <...
2
votes
0answers
27 views

Splash Screen Library in jQuery

I have created Splash Screen Library in jQuery, The Splash Screen will display until the website completed loading all the images. I just wanted to review if there is any improvements for the code. ...
6
votes
1answer
115 views

Refreshing / Cycling through a parsed RSS feed every 5 mins

I am working on a monitor signage display and have a "welcome to RSS" feed with just a title and description. I have code from feedEk that's been tweaked a bit to parse the feed and cycle it ...
3
votes
2answers
62 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 ...
2
votes
1answer
65 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;...
5
votes
2answers
340 views

My online hangman solver

I've created a simple hangman solver and although I'd consider myself proficient in webdev I am by no means an expert. The trick with this is that since HTTP is stateless, I can't really think of a ...
0
votes
2answers
66 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 ...
0
votes
0answers
18 views

Jquery selector - robustness of the syntax

I'm rather new to front-end & jquery selector. While what I am doing works, I'm unsure it's necessarily robust. FYI, the backend & templates are built on Django. The auto-naming conventions in ...
2
votes
1answer
64 views

clone of HTML tables of data

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 ...
25
votes
3answers
659 views

Code-Q2A - copy code blocks from questions to answers

I came up with an idea for a userscript to simplify writing answers on Stack Exchange while writing a previous answer. This userscript adds "Review"-links on the top of each code segment. When ...
7
votes
2answers
944 views

Module with helper functions to initialize or reinitialize a Slick carousel

I been getting into javascript patterns and would love to get some feedback. I notice that I got some general helper functions. Is this a good approach of dealing with it? ...
2
votes
2answers
63 views

How can I simplify this JQuery validation process?

How can I simplify this functioning JQuery validation process: ...
0
votes
1answer
22 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&...
1
vote
1answer
220 views

Date/Time picker for browsers that don't support the datetimelocal input

I have this code that shows date pickers when the browser doesn't support <input type="datetime-local">. Any tips on optimizing this code? ...
1
vote
1answer
73 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 ...
6
votes
1answer
1k views

Backbone.js dynamic table

I have been trying to learn backbone.js and I thought the best way to learn it is by writing a dynamic table (i.e. add, edit and delete rows of data). I am very familiar with Node.js (back-end). Any ...
3
votes
2answers
107 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 ...
0
votes
1answer
35 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 ...
1
vote
1answer
6k views

JavaScript switch statement to make an AJAX call

I have a button group that looks like this: The user selects one of the options and they can search for a person based on that criteria. I wrote a switch statement that populates the URL to make the ...
2
votes
0answers
24 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. ...
1
vote
0answers
2k 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
2answers
45 views

Click a link to delete targeted content using Ajax

I used a glyphicon as a link to delete a comment: ...
3
votes
1answer
130 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 ...
5
votes
2answers
32k views

Hide and show columns in an HTML table

Codepen Link I've tried to Google, but there's no library that has an API to toggle table columns when clicked elsewhere on the page, so I've decided to do this: ...
-1
votes
0answers
125 views

Server-side processing data table best and secure code using ajax

I am using PHP and Server-side processing data tables. I have more than 30k records on my table and I have to display the records on my page when reload so I used the below code. Is this code is the ...
0
votes
2answers
29 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 ...
10
votes
1answer
219 views

Interactive small town

I've built this simple interactive scenario. Now everything seems to be working fine except for the start of the for loop as below. What can I do to make the script ...
2
votes
1answer
25 views

Better way to work with clickable regions of window

The Goal Basically, what I'm looking for is the ability to click a region below an image to trigger a click() event which will scroll the window to the following ...
4
votes
2answers
757 views

Dynamic country, state select options

Here is code I wrote to dynamically choose between three country options (United States, Canada, Other). After the user selects a country it will show the related select option or an empty input (when ...
2
votes
0answers
92 views

Responsive snake game

Snake Snake first appeared in the 1970s. Since then it has become a video game classic that is pre-installed on many systems. The rules are simple: Food (often an apple) appears randomly on the grid. ...
4
votes
2answers
3k views

Quiz app from a JSON file

My code fetches quiz data from a JSON file, displays the questions sequentially and records the user’s answers. It keeps track of the user’s score and at the end displays their result based on a ...
3
votes
2answers
53 views

JavaScript function that reuses a modal for adding, deleting, and viewing an item

I have a table that has buttons per row that makes views/edit an item in a modal and they have a layout like so: ...
15
votes
2answers
22k views

Restricting user to one open tab in browser

I had a requirement to restrict my web site's users to just one open tab in the browser. I am aware that this is not the best thing to do in terms of general user experience guidelines, but it's an ...
2
votes
1answer
60 views

Reusable function for a validation process

I previously asked how can I simplify a validation process: How can I simplify this JQuery validation process? But in hindsight, what I really meant to ask was how can I turn that process into a ...
1
vote
0answers
80 views

Make Pagination using Ajax with Jquery, PHP [closed]

This is the first time that I have add (I mean, I try) Ajax with Jquery to PHP and Mysql (pagination). This is a link to the test page: testpage1 I think everything works, but is it done correctly? ...
2
votes
1answer
31 views

Is there a way to consolidate Ajax dropdowns that filters data from MYSQLi database

I recently started a project which has a database of rail cars for a train simulator. Im trying to set up a way to filter the data based upon 4 categories "Car Type", "Road Name", &...

1
2 3 4 5
48