Newest jquery Questions

Q&A for professional and enthusiast programmers

jQuery .ajax() 200 status but errors “Status is duplicate”

I have a jQuery ajax call: var request = $.ajax({ type: "post", url: url, data: { <!-- bla --> }, dataType: "json" }); request.done( function(json) { <!-- bla -...

checkbox property check value not updating in knockout js

I am working on Knockout Js. I have a page where I have three checkbox and its under foreach loop. Here is code <div class="form-horizontal" id="ko-bind-element"> <input type="...

Ui jquery scrolling prevention

I am using this code to create a message on the top of a drawing canvas and it works fine but sometimes the user scroll the screen and deform the drawing page <!doctype html> <html lang="en"&...

Fancybox 3: Changing dynamically data-fancybox-group

I'm using a filtered gallery and data-fancybox to group valid items after sorting but it seems that it doesn't work after I change the filters. After I get my validated items I change the data-...

Category system for carousel?

I'm using lightGallery with cycle2 plugin and I have categories for my image and when I clicked any categories my images must change with clicked category how can I do that ? any example ? my a[data-...

Selectable Variable/goto statement

so i am making a basic dice game for school - i am very new to this. basically what i want is to be able to have upto 3 dice being rolled but would like each to run a different code (to be rolling 1/2/...

jQuery fadeTo based on time of day

I'm working on an open source project called BitDay that I started a while ago on Reddit. I have 12 elements as CSS classes, each has their own background image. Right now, the jQuery I have fetches ...

JQuery datatable object datasource not working

I am trying to create a JQuery datatable with a js generated datasource. I have this object: [ { "a": -817, "b": null, "c": "Default", "total": -817 }, { "a": -21, "b":...

Display dropped link as an inner clickable div

<div id="dropzone" contenteditable="true"> </div> <style> #dropzone { height: 50px; width: 100%; border: 1px solid black; } </style> When I ...

datatable fnfilterclear return cannot read property

I'm right now working with jquery datatable + fnfilter by toggle button . my datatable : <table class="table table-bordered table-dataTable display nowrap" id="mytable" cellspacing="0" ...

JQuery Parallax effect. OnScroll event very Laggy

I'm trying to make a simple Parallax effect in js. There is my code: function parallax(){ $(".parallax").css("backgroundPosition","50% "+$(document).scrollTop()+"px"); } parallax(); $(window)....

Upload Excel to Slack using files.upload API - file uploads, but is corrupted

I'm using Slack's files.upload API to upload an Excel doc retrieved from an AJAX response. I'm using jQuery's AJAX for the upload and the file is uploading correctly except that it's corrupted. When ...

Mask an existing input value with javascript/jquery?

I created a function to get the length of my input value and applying a different replace (a mask) for each one, but it's not working. Check it out: function mask_vat(inputID) { var mystr = ...

Jquery Dialog not working on image click

Workflow: Passing JSON to angular scope and using ng-repeat in the View to display it. Using following function to show dialog on click of elements of a particular class. $(function () { $("...

Bootstrap toggle tab not working in jsp page

I am trying a new web applications and this is the 1st time I am using the Bootstrap and JQuery. I have included the downloaded bootstrap folder under /resources/ folder in my webapp folder of my ...

webbrowser.documentCompleted no get content javascript C#

private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) { //This line is so you only do the event once if (e.Url != webBrowser1.Url) ...

C# how to get content jquery use webbrowser C#

<script type="text/javascript"> $(document).ready(function(){ var $grid = $('#file-list'); $grid.jqGrid({ height: '100%', ...

How much percentage does Bootstrap v3 use jQuery's source code?

I would like to know that how much percentage does Bootstrap v3 use jQuery's source code? Thank you!

NodeJs + PhantomJs page content doesn't have all the elements

Hi I am trying to parse a website which has live football scores. Using NodeJS and PhantomJS together (phantomjs-node). The thing is I am not able to run JQuery in page.evaluate on an element because ...

How to load multiple types in Fancybox 3

I use Fancybox 3, this is how I load my gallery (I disabled opening/closing animation so I load it like this: $(document).on('click', '[data-fancybox-var]', function(e) { e.preventDefault(); ...

How do I compare two similar dates within a container using jQuery?

How do I compare two similar dates within a container? <div class="container"> <div class="itemHead"> <span class="ModuleDate">Mar 01, 2017</span> <a ...

`chrome.tabs.onUpdated.addListener` event returns strange results

This is the code I'm trying on background.js: chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) { alert(changeInfo.url); }); I'm trying to trigger this event and show the new URL ...

Bootstrap Datepicker not working in Firefox by works in all other browsers

I have a Bootstrap Datepicker in use on a web app. It works fine in all browsers except FF. Interestingly there are no JS errors in FF, but what I do notice is my input field is turned from type=text ...

JavaScript image gallery slideshow

I'm trying to make a simple photography website with a photo gallery slider navigation, but when I click to see the next image, the browser repositions to the top of the page. What am I doing wrong ...

dropdown box in php and javascript

I am looking for a way to create a drop down list depending on what the user chooses. If the user picks the package of one profile the the output will give the user a drop down list with 1 field if ...

Bubble text canvas effect as background

I have found a beautiful background text effect, and have no idea what is the key word for it. Can anyone help me? Here's the link, the effect I mentioned is on the top of the website "Good Innovation"...

Isotope Masonry - whole grid is shifted left

I am trying to create the following grid with Isotope : (disregard the white box in them) CODE HTML <div id="promotionalFilm" class="container"> <div class="grid"> <div ...

Perform jquery if text has certain amount of lines

Hello I have kind of a crazy question but is it possible to perform jquery if text has certain amount of lines? Basically the logic I am looking for is: If the text in a DOM element is on 2 lines, ...

how to style the result a php value that is been echo in an javascript onclick button

Good day guys, i am having an issue with this line of code, i echo a php echo value in a javascript submit function, which worked very perfect using this button code <button class="btn btn-...

Getting Cards to Sort to Top Left

I have a card layout here: http://jesseddy.com/resource-library. I'm using a jQuery plugin called Tagsort (https://wch.io/projects/tagsort) to filter the cards based on tags. Functionally it works but ...

Require() on jquery.dotdotdot multiple jquery Modules warning

i have a project where i'm trying to load my JS dependencies through NPM instead of using CDNs, everything was going great until i hit the jquery-dotdotdot package apparently it depends on jQuery ...

I need help formatting jquery datetimepicker to display date like this: Tue Jan 24 14:00:00 EET 2017

I need help formatting jquery datetimepicker to display date like this: Tue Jan 24 14:00:00 EET 2017 , this field is dynamic and I tried to add "data-date-format" attribute with jquery then apply the ...

JQuery (should not to) hides form after Submitting it

I have the tiny homepage, which works in the same window by hiding/showing necessary blocks via display block/none properties using JQuery script which is: $(document).ready(function(){ $(".show")....

My jQuery won't work at all in my code

I've spend the last couple of days looking around to try to figure out why my jQuery doesn't work in a external file, or at all. My jQuery itself seems to be fine, but something with the files is ...

Bootstrap ScrollSpy and links don't work properly

Learning Bootstrap these days but ran into some difficulties. I am trying to use Bootstrap ScrollSpy but it doesn't seem to work and I can't figure out why. How can I keep the left column fixed in ...

How to make summary table by jQuery?

I have a table with product/customer in year: When I checked in each customer, table column for each customer appear, when I unchecked, customer column hide. Now I have to make summary table of ...

Angular - jQuery Syntax Highlighter not working for nested view

I have an angular application and it working well. In on my nested views, I would like to display javascript source code. I found this tuto that is working on normal views, but When I try to implement ...

When JS diverges based on value of select option, does your JS check options exactly or?

Given some html: <select id="this"> <option value="a"></option> <option value="b"></option> </select> If your JS does different things depending on which ...

Get ajax response inside dataTable()

This is my existing code for pagination here I am getting error as roleList is not defined. I don't know how to use ajax response inside of dataTable().What I did wrong? I got struck with this part ...

How to fetch data values from table if checkboxes are selected?

I have a table like <table> <thead> ... </thead> <tbody> <tr> <td><input id=...

Adding jQuery for Bootstrap in Angular2

Where should one correctly include jQuery for Bootstrap 4 within Angular2, taking into consideration architecture best-practices and potentially performance when loading pages?

Slide a div from left-right or right left with preserving div size

I want a slide effect on a div from left to right or from right to left as in $('#div').show('slide', {direction:'left'}, 1000); being my html is <div id="div-pre"> </div> <div id="...

I need a simple 20 minutes timer in php it should be good looking [on hold]

Hello guys i am new on en.stack.aiseen.org,i am a beginner in php and i am making a project in php for a dynamic quiz with database and stuff.So now i need a countdown timer for about 30 minutes it ...

Jquery evaluating 2 time fields

I have a form which contains two dropdown lists, From time and To time. Both lists display the hours in 24 hour format but the hour values are are plain numbers without any leading zeros. When I try ...

adding handle to a gallery

I am struggling with adding a handle to a pics gallery. Here is the code that loads pics: <!doctype html> <html> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery....

javascript / jquery-how to change the window location if all the stylesheets are not loaded in HTML

hey i want to check whether all the stylesheets(css) have loaded or not(in HTML) and if they are not loaded then change the location of the window to:- "error-handler.php". if this can be done with ...

React equivalent of jquery DOM access

What is the equivalent of the following code: pick_attribute = moment(`2017-${month}-${day}`).format('x'); // toggle colors color = day.hours <=3 ? 'orange' : ...

jQuery - Parse JSON from multiple urls and append to multiple divs

I got a HTML list with 4 items (each item has their own id assigned). For each item in list, I'm trying to get JSON data from multiple urls using ajax, then parse the data to the item's id. Expected ...

Not able call Carousel frunction in react-bootstrap

Trying to create an carousel with thumbnails. When click on thumbnail image it needs to call carousel function. import $ from 'jquery'; import 'react-bootstrap' function changeSlide(){ $('[id^=...

.CSS jquery random

When I console.log(newX/Y) I am able to get the numbers out, but this line can't seem to work: $robo.css('left', newX + 'px') & $robo.css('top', newY + 'px') Is there a way I can randomly spawn ...
Translating... 0%