Questions tagged [jquery]

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

194 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1
vote
0answers
146 views

Hopefully secure post love counter

Is my nonce implementation secure? I'm trying to learn security on wordpress->ajax (and later woocommerce) and with wp_create_nonce. After much struggling I managed ...
1
vote
0answers
47 views

Custom expression that filters elements based on jQuery internal data

With jQuery, I'd like to be able to easily select the following types of elements: Elements that have a specific value set for a specific data attribute in the raw HTML Elements that have had a ...
1
vote
0answers
90 views

Overlay on an image

This is, for instance, used on this page, and it overlays the main product picture with some DIVs: ...
1
vote
0answers
561 views

Appending JSON values to the DOM

My code below uses JSON to append images into the DOM. It works properly but I want to optimize my JavaScript to see if I can write it in fewer lines or if there are methods I can use that optimize my ...
1
vote
0answers
48 views

Appending a group name to each committee member

I wrote this script to get text, if it equals, append the name of the group to a person's information. I know using .each() is gpu intensive and this feels like a ...
1
vote
0answers
107 views

jQuery mobile application listing beers and breweries

I have been working on a jQuery Mobile (1.4.5) application for the past week. In short, the application is a bunch of pages that show listings of beers, breweries, and other things. There are few ...
1
vote
0answers
496 views
1
vote
0answers
109 views

Inline editing for modifying field that requires supplementary inputs (such as password)

I've been using x-editable, but recently needed to perform in-line editing, but required the user to enter one or more additional fields. For instance, to change ...
1
vote
0answers
1k views

Method for realtime form validation

A quick little method for validating form input with jQuery (and some built in bootstrap classes). I know the regex isn't perfect but it's close enough. Thoughts? ...
1
vote
0answers
33 views

Lightbox plugin

Well, I'm writing a plugin that will work as a lightbox, and I wonder if there are other methods which I could use to improve the code ... ...
1
vote
0answers
294 views

Pagination with static data

I am using following code to implement pagination functionality. All items are rendering on page load and li elements greater than page set are hidden with CSS. I ...
1
vote
0answers
146 views

Implementing Ajax deferred/promise patterns

I have a test case where I want to send a request to the server every time a form field change event occurs. The implementation below works as expected until I ...
1
vote
0answers
278 views

Getting ID of Task List item in Sharepoint 2013

I want to do some operation by taking an ID of a Task List item in SharePoint on UI front. I've just wrote some jQuery code by traversing the element. I got the ID and performed operations what I ...
1
vote
0answers
1k views

Payment Gateway - single payment with credit card (handling path & choosing gateway)

This was an assignment and I am new to Node.js. You can find the complete project here. The code worked fine but was rejected, and wasn't given any reason even after asked. Statement: Create a ...
1
vote
0answers
44 views

3 selects on a page and 2 of them need to be observed for changes

There are 3 selects on a page: 2 selects are populated and 3rd empty. Onload takes both populated selects and combines them into 3rd select with groupings. An external event is simulated with button ...
1
vote
0answers
168 views

Calendar application with shaky Logic

I have built a calendar application just with jQuery. The script file is on Github. The code works perfectly fine and I have tested it. Please feel free to clone and test it as well. I am uncertain ...
1
vote
0answers
55 views

Form valid combinations from CSV selection options

I am building a form with multiple select option fields. I am trying to only show the next field if it exists as a combination in the CSV file I am reading in. It's working fine right now and I am ...
1
vote
0answers
122 views

Web Audio Oscillator Waveform

I'm currently working with Web Audio for creating a simple synth like project in the browser and implementing controls for the Oscillators via jQuery/jQueryUI: ...
1
vote
0answers
171 views

jQuery remote validation plugin

I wrote this jquery plugin to do remote validations on the server. The code self explanatory. When the field blurs (event is customisable), the plugin checks to see if there is a value and sends the ...
1
vote
0answers
26 views

Code enhancement for existing npm package

I am trying to improve the code in the npm package. I have looked through the code but don't have any ideas how to write proper code. GitHub ...
1
vote
0answers
720 views

Custom bootstrap plugin extending popover with ZeroClipboard integration

I'm trying to create bootstrap plugin that will be used for copying content to clipboard. I managed to build working version of my plugin but I'm wondering how I can improve it. Idea is to show a ...
1
vote
0answers
2k views

Angular Directive for adding/removing active classes navigation

I have created a directive which is doing several things, all revolved around adding and active class to navigation elements when clicked. It also adds the class when someone goes directly to the url. ...
1
vote
0answers
266 views

Load different table contents from mySql database using AJAX and display them

I've written a small application as a part of a much bigger project. This script grabs a bunch of tables from a MySQL database and displays them. The table that is being grabbed and displayed depends ...
1
vote
0answers
1k views

Simplification of multi level object array

I have a JavaScript array: var data = [{abc: "vf",def: [{ a:"1", b:"3"},{a:"2",b:"4"}]}]; I want it to convert to: ...
1
vote
0answers
506 views

Handling pagination on a particular page

I have a Java script that handles pagination on a particular page by using a jQuery pagination plugin. Is there any way to improve the code? ...
1
vote
0answers
567 views

CPU friendly infinite text scroller - velocity

I've done some research today and read a lot about JavaScript performance. I learned that animating using the transform: translate makes a use of the GPU, hence ...
1
vote
0answers
832 views

Cleaning up a custom checkbox implemented using the shadow DOM

I'm porting Google's "paper elements" checkbox out of Polymer. This implementation doesn't use two-way data-binding. Instead, it relies on a few event handlers. Everything works, but it feels pretty ...
1
vote
1answer
108 views

My jQuery Form Plugin

Long story short, I wrote this jQuery form plugin as an exercise to better understand how other form plugins work. If you have any suggestions about how to improve this (or my coding style in general) ...
1
vote
0answers
523 views

App using JQueryMobile and Cordova

I have received a project that is built on Cordova with JQueryMobile. The app is already published on three platforms and is being used by 100K+ users. Now I have to add new functionality in it. But ...
1
vote
0answers
564 views

Setting up a global site search using typeahead

I've written a "clever" bit of javascript that sets up typeahead and bloodhound for use as a global search facility. To make this even more clever, I've stashed a date for when the search JSON that ...
1
vote
0answers
4k views

Modal dialog and jQuery AJAX calls based on button click

HTML code for Add New button: ...
1
vote
0answers
76 views

Optimizing jQuery table building by replacing appends with string concat

I've wrote some code to create a grid of data, however depending on the size of the grid being drawn, IE8 shows a warning message about a long running script. I've read that multiple appends are a ...
1
vote
0answers
390 views

Bind and unbind clickoutside event

I have a jQuery dialog that is opened when the content of a div is clicked. When the dialog is opened, I am binding a jQuery outside event so when the user clicks anywhere outside of the dialog the ...
1
vote
0answers
230 views

Sliding a box out the bottom of a page

I have this code that's pretty much straightforward: it slides a box out at the bottom of the page and keeps another element fixed when you scroll past it. What I am wondering is if there's any need ...
1
vote
0answers
61 views

scrollTo and hide element code improvements

In this post, I asked how to scroll to an element and hide another via jQuery. In my main javascript file I've made a script, but I'm not sure if it's correct. Can you tell me if this is a good way ...
1
vote
0answers
758 views

Hide element when clicking anywhere but some elements using jQuery

I had a jQuery program that displays some hover-over messages when touching an icon, in order to make it disappear the user needs to click again in the icon. ...
1
vote
0answers
204 views

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

Any tips on optimizing this code? ...
1
vote
0answers
3k views

Checking if a child element exists

Is there is a better way of selecting the span tag that I'm dynamically adding? Here's what I'm trying to do: If you click the .toggle div, it shows a detailed ...
0
votes
0answers
4 views

Check Managed Sites Up/Down Status - Works Only Sometimes?

I have a page on my website that is intended to check and reveal the online/offline status of web properties (i.e. managed websites). However, it only works some of the time. I can't seem to find out ...
0
votes
0answers
23 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. ...
0
votes
0answers
14 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
0answers
19 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: [...
0
votes
0answers
30 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 ...
0
votes
0answers
14 views

Hiding and repositioning some elements for some WordPress posts

I have to gather a few posts (a Wordpress site) and I need to hide some elements and move some others. There are 2 simple ways to do this, which one of these is better if there is a better one and why?...