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
3
votes
0answers
31 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 ...
4
votes
0answers
57 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 ...
1
vote
1answer
27 views

Temperature record of Fridges Project

Goal: I have thought of a project to create and came up with this goal of: "To record temperatures for different Fridges or Freezers." Current situation I have a working method to get data ...
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 ...
3
votes
1answer
47 views

eCommerce Mock App

This is a follow-up question to eCommerce Mockup App in JS. 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 ...
5
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 ...
0
votes
2answers
1k views

Handling keyup events with throttle or debounce in Javascript/jQuery

In my web application, there is a search input field, and when the user empties all of the text inside the input field, there is an API call made for a default-list of results, which are displayed in ...
5
votes
1answer
4k views

Truncating text with jQuery but keep the HTML formatting

I repeat here this answer on Stack Overflow. I first posted an answer with not finalized code, as a simple description of the solution I could think, without any test. But later I remained interested,...
2
votes
2answers
46 views

How can I simplify this JQuery validation process?

How can I simplify this functioning JQuery validation process: ...
2
votes
1answer
51 views

What is the best way to use serverside validation in PHP PDO?

I have a form on my page. I am using jQuery validation for client-side and PHP for server-side validation. I am using PDO. I don't have any issues with client-side and server-side validation. My form ...
3
votes
0answers
57 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 ...
4
votes
1answer
1k views

Static quiz module with predefined answers

I was building a quiz module for one website. It is a simple true/false statements where you first choose the answer, the correct answer is displayed, and then you can move forward to the next ...
3
votes
1answer
43 views

jQuery dropdown using each

Can someone please review the code and suggest any improvements / changes? Note that this method works but wanted to see if there is a better way for self learning purpose JavaScript/jQuery. Example ...
1
vote
0answers
7 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
1answer
35 views

Incrementing and decrementing 3 seperate input values by 1 using Javascript

I have written the following Javascript code which increments and decrements 3 separate inputs by 1: ...
2
votes
1answer
49 views

Javascript - Extract data from html table

I want to extract the headers data and column data (not row data) from an HTML table using JavaScript. Is this a good approach of doing it? And how can I simplify this using jQuery? ...
2
votes
1answer
26 views

How can I clean up (DRY) this verbose jQuery code?

I had posted this on StackOverflow — someone pointed me here. My code is working, but it's incredibly verbose and I know that it can be made more compact. I just don't know how :-) I'm building an ...
2
votes
0answers
20 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 ...
25
votes
3answers
620 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 ...
1
vote
1answer
35 views

Implement jquery like functions addClass, removeClass and delay in Javascript

Assume $ is not the browser. Now have to implement $, it will take a string, which is a query, it will use the querySelector to select the element. (Reference: https://developer.mozilla.org/en-US/docs/...
7
votes
3answers
47k views

Check if select has a certain option

I suspect there is a simpler way to find if a select has a certain option, but don't know what. The objective of the following ...
0
votes
1answer
35 views

Custom Library (pseudo-jQuery)

Well, I'm not going to use it everywhere, as jQuery exists, but still was interested in experience of creating own library. Here are first steps: ...
1
vote
2answers
129 views

jQuery form.find radio class

In my application we have four inputs radio controls and on the load the value is checked to true. When the user select another radio and then save the form I want to get the new value. I am using the ...
4
votes
1answer
87 views

Python/Django Class based saving

I'm creating multiple Django apps with vote possibilities, so I made an app vote to handle all this votes. In my templates I'm including an ajax-function named <...
2
votes
1answer
81 views

jquery update hidden and a tags

First off, not the greatest with jQuery but know enough to get by. I created this mock up that is base on my application and wanted to see if there is a better way to update hidden values and a tags. ...
9
votes
1answer
193 views

Interactive small town

I've built this simple interactive scenario. Now everything seems working fine except that when start for loop as below. What can I do to make the script faster? ...
3
votes
2answers
744 views

Fading HTML elements in and out after timed delays using jQuery

I recently launched my first website, and despite being very proud of how far I've come, I know that my code is more "I got it to work" than "It works the best that it can." I'd like some criticism, ...
10
votes
2answers
470 views

PHP Chess Version 2

For programming practice, I created a chess program in PHP (my most comfortable language). The program reads a FEN (a string with the location of all the pieces on the board) from the URL, generates ...
5
votes
1answer
1k views

JavaScript quiz game

Here is the JavaScript code: ...
2
votes
1answer
59 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. ...
0
votes
0answers
14 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
1answer
54 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 ...
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
26 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
51 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....
13
votes
2answers
17k 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
30 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, ...
5
votes
1answer
481 views

JavaScript responsive menu (dropdown/dropup)

I have the following front-end code for a responsive navigation menu which I thought using in my WordPress website. Clicking the .burger element should cause ...
0
votes
0answers
48 views

Showing and hiding information with photos

I have been given an extremely loose design to follow: a page must show people's photos and name in a text overlay over the image, and when clicked a bio shows below. Must Haves Photo, text overlay ...
3
votes
2answers
29k views

Add classes onclick and then remove them with onfocus event

Right now I'm mixing JS and jQuery. I would like to find one unique solution with JS only possibly. How can I organize the code according to best code practices? Another thing I need to add is a ...
2
votes
2answers
4k views

jQuery Accordion + Sub Accordion + Search Filter

I have a top level category accordion + accordions within those and a search that auto-opens the 2 levels when results are found. Since you can't open multiple at once there is a Next button that ...
0
votes
0answers
23 views
3
votes
1answer
146 views

Paginating a Backbone collection

This is part of a class for paginating a Backbone collection. The paginateTo method is for paginating to a model id. It returns ...
1
vote
1answer
27 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
39 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
59 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. ...
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
1answer
69 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? <...
5
votes
1answer
104 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 ...
1
vote
2answers
691 views

Security of a custom table in JsGrid

This is my old topic,it is about show table's records by JavaScript using a JsGrid file and can edit or delete by ajax. This is my topic How can I load rows in JsGrid table that got from php file?, ...

1
2 3 4 5
48