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

learn more… | top users | synonyms

2
votes
1answer
18 views

Confirmation to delete items using a jQuery modal dialog

I'm looking for suggestions on how to clean up JavaScript/jQuery code that looks like the example in the Before snippet. I'm a backend developer so some of the ...
2
votes
2answers
51 views

jQuery replace HTML

In a portion of my code to get a "report view" where the element is different (textarea becomes a div or span) and use the same data with newlines I replace the new lines with page breaks. Currently ...
1
vote
1answer
28 views

Time Card Web Application Offline

About & Purpose Purpose: As said by the title this is just a simple web application for use of a SINGLE user. It has the features of calculating total hours, clocking in, and clocking out. It ...
-3
votes
1answer
21 views

jquery custom callback function [closed]

Is there a way to directly call my callback function without creating a new function? ...
5
votes
1answer
39 views

Validation for a user form using jQuery

I have a really bad habit at the moment with writing global specific functions to handle data and feel like I could reduce my work load by stop copying the same. Basically I have a registration form ...
-1
votes
1answer
54 views

Javascript - Which is faster? [closed]

I'm quite fond of jQuery, and I'm trying to learn AngularJS right now. Which is faster from the two codes below: jQuery: ...
1
vote
0answers
18 views

Generate a patch description from multiple SVN commits

I have a Spring app that is used to create patches for another application. My client retrieves a list of branches from a SVN repo through the initial AJAX call, then if one branch is chosen, another ...
4
votes
1answer
60 views

Making a staircase using HTML and CSS

Here is my answer to the question, which I think is quite inefficient considering its length: ...
1
vote
2answers
23 views

Placement of jQuery function that toggles p tags

I have a page with lots of jquery. There are lots of functions inside: $( document ).ready(function() { //lots of functions }); After that "document ready" ...
1
vote
1answer
40 views

Objects using jQuery to maintain a playlist of shows

This is my first attempt at using OOP JavaScript in my work. I know the concepts but implementation is more complicated than I thought. Now the code is a mixture of several things (JavaScript/jQuery). ...
2
votes
2answers
41 views

Enabling or disabling buttons on certain events

I need to run the following checks in two occasions: When a certain modal is first shown or clicked, When one of two inputs is filled. How can I remove redundancy in the following code? ...
0
votes
1answer
23 views

Get value from an async function in Outlook Web Addin

I'm working on an Outlook Web Addin that gets the email body. So in the Office API you could get the email body in two types: Simple Text and Html. Our requirement is to get the HTML format so this ...
3
votes
2answers
45 views

Creating keyboard shortcuts for highlighting elements of given classes and toggle through them

I have written a jQuery script to create keyboard shortcuts to highlight elements of a class (given to me) and toggle through them. I have created the HTML file myself, so ids and class names are all ...
0
votes
1answer
36 views

Converting Confluence markup to a simpler XML format

I have a code that converts one xml structure to another. I am removing unnecessary tags and replacing some temporarily. I think I have way too many replace operations and wondering if there is a way ...
0
votes
1answer
30 views

Repetitive jQuery click functions for changing multiple elements

I'm using the following code to change elements text and classes when a click event is fired. My question is: Is there a better way to go about doing this that ...
0
votes
1answer
25 views

Simple survey application with jQuery and Bootstrap

I needed to put together a small survey / test application which consisted of a bunch of radio inputs. I decided to give the standard radio button a visual overhaul and also rethink the visual ...
3
votes
1answer
23 views

Efficiency and length of functions when perfomring similar tasks to classes and IDs

I'm not proficient at jQuery, however can tinker and get basic functionality working as I would like. The below code is performing a number of functions to change states of some elements in my site, ...
3
votes
3answers
66 views

Change text and styling of a form control when a slider value changes

Having a hard time to achieve what I'm looking for. I was thinking of using arrays but don't know where to start. Code below is what I want to shorten to get rid of multiple ...
3
votes
1answer
62 views

Jquery Testimonial Slider Controls

I built a testimonial slider that automatically plays on load and stops auto playing when the slider controls are used to change the active slide. I feel like it could be optimized easily, especially ...
0
votes
2answers
55 views

jQuery hover and click events

This seems a little bit excessive, and was wondering if I can refactor this jQuery. I'm not sure if you need anymore information, or if it's possible just by looking at this script. ...
-3
votes
0answers
42 views

Re-Structuring `Object` in javascript programming further simplified?

I am restructuring a object for a static structure. is it simplified further? as well the way what I written is future proof? ( can be handle any size with any no.of children) ? please help me: here ...
4
votes
0answers
34 views

Tic Tac Toe Implemented With jQuery Table Pseudo-Buttons

Made this code myself. I was experimenting with making buttons from a table, and decided to make a game of tic-tac-toe with it. The code loads from json a grid, and then makes a tic-tac-toe game with ...
2
votes
1answer
53 views

Javascript to set a value of an iframe in the parent

This code works on Chrome 58 but it makes me feel dirty parent.parent.parent.document.F1.document.getElementById("txtNewDrugAction").value = "foobar" "F1" is the ...
1
vote
1answer
65 views

JavaScript/jQuery carousel/slider

I wrote this jQuery/JavaScript code for slideshow of my dynamic webapp. Is this too much jQuery code for carousel? It seems to work fine on my PC, but with bigger images it gets slower (7MB+) which is ...
3
votes
2answers
50 views

JS/jQuery - Sort data by year

An AJAX request gives me an object, containing dates and values: ...
4
votes
2answers
754 views

Button controls for a slider

I've just finished building my slider and currently trying to refactor some redundant if/else code. Here is a preview of the code that I have built. Inside the event handlers. I have some if/else that ...
4
votes
2answers
91 views

A game of rock, paper, scissors made with ES2015

Please give me feedback on my code, on what you like and don't like. I tried to make use of ES2015 as much as I could. There is some jQuery in there as well. Any pro tips you can give me? Here is a ...
2
votes
1answer
66 views

Displaying a table using DataTables and AngularJS

I am using DataTables to format and display a table. I started the project using AngularJS with a PHP backend but I needed to inject some Vanilla JS and JQuery code in order to use DataTables. Is ...
0
votes
0answers
27 views

filter out a row by states using jquery:not

I have a table, that will be very big. I want to be able to filter out rows by state, so I only see the rows that match the selected state. I have a working jquery solution, but if one line contains ...
2
votes
0answers
29 views

minimizing a code for action fired up by scrolling action using waypoint js

I need an advice on who to write better code. I have a side navigation where there are 4 markers that appear every time I scroll to specific section on the page, the code is working well but it is ...
0
votes
0answers
69 views

JavaScript Calendar with Local Storage

I have created a calendar with JavaScript and jQuery which is simply storing notes on local storage. As of now I am a html and css developer and trying to step on javascript development side. The ...
1
vote
0answers
54 views

jQuery/HTML5 Finance Calculator

I have created a simple jQuery based finance calculator. Just to make it easy to read I will list below all the functionality and validation it has. Functionalities: Ability to enter the amount ...
1
vote
0answers
46 views

Revealing Module Pattern with jQuery

I started to break apart my 'spaghetti' code into modules, after watching a few videos online. Now I want to know, am I separating code enough? I feel like I was off to a good start, but I feel like ...
2
votes
1answer
39 views

Search a search button on page and toggle open class and focus on the input

I have a jQuery solution as below. I am confident the solution can be made better in terms of OO way using constructor pattern ...
2
votes
1answer
75 views

Simulated chat bot

I am creating a very basic simulated chat bot/dialogue tree. I have the whole conversation mapped based on what a user selects. However, I am doing this by storing all of the conversation in ...
3
votes
2answers
82 views

Toggle the visibility of sections of a form

This code I written by myself. Here I have 3 main part. When I click on any main part then it sub part will appear. Sub part contain some check boxes. Here I have the following main functionality ...
4
votes
2answers
43 views

Select box to highlight choice deviation

I have a select box that in default state looks as default (white, etc) but when I select a different value, I want the entire table row to highlight in yellow. I did this, but I want to make it ...
3
votes
1answer
50 views

Add active class to current menu with extension method or jQuery

In the layout, I have a menu that contains some ul and li. I have three levels`. This code is a bit of a sample: ...
3
votes
1answer
65 views

Central ajax function in jquery

I have created an central AJAX function (using JQuery) which will be responsible for handling all the AJAX calls in my project. ...
3
votes
1answer
49 views

Triggering on form submit

In my HTML, I have a large form (id ="myform") that asks users to fill in 5 fields for Date of Birth (DOB), Sex, Weight, Hair Color and Eye Color and then several other fields which don't relate to ...
1
vote
1answer
29 views

Square Progress Indicator

On the Beme app, while a video plays, the border acts a progress bar, filling from upper left to upper right to lower right to lower left. I want to achieve that. And I have, but my code is ...
0
votes
1answer
53 views

Optimizing JSON append template

I am fetching a list of messages from some JSON and appending each message as an LI within a UL. I have created the message template within jQuery to append each message to the document. My code works ...
4
votes
1answer
56 views

Building a table from the result of an AJAX call

I am looping through content coming from the database using an ajax call. Then I'm building a table using a for loop. Is there a faster way to build the table using the data from the database or is ...
6
votes
1answer
276 views

Dynamic UI generator

I am developing a query builder which consumes OData Web API (won't go into details on how it works in the back end). I have this EDM/Metadata which I am using to generate UI components. I created a ...
3
votes
1answer
58 views

A neighborhood map of things to do and eat in Downtown Las Vegas

I have been coding in javascript for almost a year now, and I would like your input on what I could do better. Also, any tips for organizing code a little better? Do you use MVC for every project? ...
3
votes
1answer
55 views

Keeping a search history in localStorage, with a length limit

I'm having a problem figuring out how I can make this particular part of my code DRY. Currently, the code is repeating itself but with minor changes in each case of a switch. SearchParam is a string ...
2
votes
0answers
49 views

Simple jQuery plugin that excerpt text

First I work on all of my projects alone, and I feel like I need my code to be reviewed by others and deep dive into performance and best practice ... etc. I created a simple jQuery plugin that ...
1
vote
1answer
32 views

Using JS/JQuery to serve ads from a self-hosted advertisements solution

I'm working on a custom (self-hosted) ads solution that allows the users to create ad units (by uploading the banner image and target URL) and get the ad display code. A JSON response is returned (by ...
2
votes
0answers
29 views

Lesson slideshow/classroom app

Overview I am looking for feedback on this (personal) project that I am working on that is rapidly becoming quite complex. I am fully aware that this is horrific code quality... I just want to get my ...
2
votes
2answers
91 views

Tic-tac-toe with many enumerated computer moves

This code is able to create a tic tac toe game, user vs a computer. For every move the user makes in a check board 3⨉3 abc⨉123. The functions setup the instance of the game along with creating the ...