Questions tagged [jquery]

328446 questions
1

votes
3

answer
2.6k

Views

Uncaught TypeError: $(…).code is not a function (Summernote)

I don't know if it's the same error as many got here: jQuery is not a function erreor how to fix : Uncaught TypeError: $(...).summernote is not a function #2087 jquery: Uncaught TypeError: $(…).error is not a function But I'm stuck with it like a gum under my shoe. Here's the actual error on my Ch...
Will Marcouiller
1

votes
1

answer
503

Views

Function from other file is not defined

I wrap by $(function) both files for running code when page is ready. But for some reasons calling function from first file in second file gives me error 'ReferenceError: test is not defined'. First file: $(function() { function test() { alert(1); } }); Second file: $(function() { test(); });
DIAMONDMAN
-1

votes
0

answer
26

Views

Generate download using javascript [duplicate]

This question already has an answer here: download file using an ajax request 9 answers How do I return the response from an asynchronous call? 34 answers I'm trying to make a downloadeable file. Since it takes a while to generate I wanna use jQuery to show an animation and then download the file...
ffuentes
0

votes
0

answer
15

Views

how to display the icons in the cell of a column

I rendered a view from the entity list in MSCRM (Dynamics 365) and wants to add a icon in the column cell through jQuery $(document).ready(function(){ $('#EntityListControl td:empty').each(function() { $(this).parent().children().innerHTML('https://cdn1.iconfinder.com/data/icons/CrystalClear/128x12...
amit solanki
0

votes
1

answer
14

Views

Make (Dynamically Generate) Textarea Attribute Autofocus & Required

I was trying to make the textarea generated dynamically autofocus when clicked it's parent Div. But it is not working. The same happens with required and maxlenght. I appreciate any help :) I try writing in the tag autofocus, required and required='required'. And therefore in JQuery I used focus() a...
2

votes
1

answer
110

Views

Trying to make epaper dynamic using C# asp.net web form

I have static e paper but i want to develop dynamic e-paper like below url https://epaper.dawn.com/?page=15_04_2019_001 I have no idea to start e paper dynamic below is my whole html code q Times body { background-color: #fafafa; min-height: 100vh;} .container { margin: 200px auto; max-width: 600px;...
mohd mazhar khan
1

votes
1

answer
19

Views

jQuery - How to wrap input tag with label

I would like to wrap input tag with label and li tag. Apple Banana Orange However, Output is following... Apple Banana Orange I can't remove My code: var foods = [{id:1, name:'Apple'},{id:2, name:'Banana'},{id:3, name:'Orange'}]; for(var f in foods) { var tag_input = $(''); tag_li = $('') tag_...
nk18
1

votes
1

answer
14

Views

How do I add an offset to a scroll detection function?

I'm having some trouble adding in an option offset to my JS code. I wish to be able to add an offset on when the code initiates on the screen, but can't seem to figure out where I would put the calculation. I have tried minusing the offset from window.innerHeight but it seems to cause the opposite...
Kapur32
1

votes
1

answer
334

Views

Javascript - How to change src of iframe when video ends

I would like to know how can I change the source of iframe automatically when video ends. I am using this script to generate iframe and the function onPlayerStateChange to detect when the video ends. I basically need to change the videoID after the video finishes playing. My JS: // create youtube pl...
Adam Šulc
1

votes
2

answer
1k

Views

Is jQuery UI Layout incompatible with jQuery 3.3.1?

jQuery UI Layout works with older jquery but not newer jquery... Working example: var myLayout; $(document).ready(function () { myLayout = $('body').layout({applyDefaultStyles: true }); }); west center Not working example - newer jQuery var myLayout; $(document).ready(function () { myLayout...
barrypicker
1

votes
1

answer
1.1k

Views

SingalR Error during negotiation request

I've got a project with SignalR and AspNet. I'm trying to connect my client (its a cors) and the first request returns 200 code but I'm getting this error in my client side: Error during negotiation request. My SignalR Server side classes: public class Startup1 { public void Configuration(IAppBuilde...
patricia
1

votes
1

answer
482

Views

toggling series of google chart on and off by clicking on legend

I have an area chart that has 6 series. I want the user to be able to click on the legend to toggle the visibility of a series. I found this example & have tried including it in my code below but nothing happens. Before adding this code if I clicked on one of the series in the legend the series woul...
mHelpMe
0

votes
4

answer
26

Views

Get div input childs value

I'm tryin to get the value from the three inputs containd on a group of divs but only th edivs that doesn't belongs to invisible-age-range-row Franjas de edad Desde Hasta % + - Desde Hasta % + - Desde Hasta % + - Desde Hasta % + - Desde Hasta % + - Desde Hasta % + - Desde Hasta % + - Desde Hasta %...
afdi5
0

votes
2

answer
31

Views

Fail to load resource error : the server responded with a status of 404(not found)

I'm creating a website to present a project, and I have to do a slideshow with several objects that can be seen at the same time. In order to do that I've planned to use this: https://kenwheeler.github.io/slick/ I've followed the tutorial and just tried to do a simple example to see how it works, th...
Léonard FONTAINE
0

votes
1

answer
15

Views

How to update a page with an external weblink, keeping the navbar fixed

We are trying to show some popular websites in custom page of ours. We added some buttons with relevant links, and when clicked on them it should redirect to that website, while being shown on the same page of ours. Is there any work around about it? Our approach was, to put a click event for each...
Sandeep Roy
0

votes
0

answer
17

Views

First AJAX always happens before last nested AJAX done

I'm using nested AJAX. I disable button before all AJAX calls then enable button within .always in outermost AJAX. But the problem is that I think code to enable button happens before code within .done of innermost AJAX. Is it because the .always in outermost AJAX runs in parallel to .done in innerm...
Ben Kao
1

votes
1

answer
294

Views

Popup issue after upgrading jQuery from 1.11.1 to 3.3.1

I was using jQuery 1.11.1 and jQuery Mobile 1.4.5, everything is working fine. Recently I have upgraded jQuery to 3.3.1. I am getting popup issue. I am getting below error when i tried to open the popup in button onlick by calling popupCaptureOptions() function. Uncaught TypeError: e.preventDefault...
MobileDev
1

votes
2

answer
45

Views

How to store object in localStorage

I have the following code: localStorage.setItem('ActiveDataOfpModel', iHandle.find('ul li.pModel.active')); When i check 'ActiveDataOfpModel' value in console i get '[object Object]'. How can i store the actual object in 'ActiveDataOfpModel' and retrieve its properties. i.e. i want to do the followi...
Waleed Naveed
1

votes
1

answer
33

Views

Arrow function within jQuery map

I'm trying to use an arrow function within jQuery's map function. With the following testTitlesText is the correct length but each string is empty: let testTitles = $(panelBody).find('h4'); let testTitlesText = $(testTitles).map(testTitle => $(testTitle).text()); My ES6 transpiling is working, and j...
Ted Fitzpatrick
1

votes
2

answer
27

Views

How to remove the text of sortable area when item is dropped on it?

I have the following code to perform sorting and drag and drop of the element. Here I am unable to remove 'Drag and drop link here.' from following div when item is dropped. Drag and drop link here. When I run stop: function(event, ui) { var item = $(ui.item); if ($sender !== '') { if ($(this).te...
Kiran Shahi
0

votes
1

answer
17

Views

How do I concatinate strings in attr

I want to concatenate strings in attr using jquery I have already tried using + but it doesn't get the value of the variable: var job_id = $(this).attr('value'); if(confirm('Are you sure you want to delete this? This will be removed permanently')){ $('.job_delete').attr('href', '{{ route('job_delete...
Saitama Kalbo
0

votes
0

answer
14

Views

How to disable all elements within a div using jquery

I have a div and when a checkbox is clicked I want to disable all the elements inside the div, including disabling the onClick of one of the elements. Here is the codepen: https://codepen.io/anon/pen/JVwMOq HTML: JS: function checkMe(element){ if($(element).prop('checked') === true){ $('#test').pr...
DM5963
0

votes
2

answer
13

Views

How do I add onChange events to a list of elements, that will update the HTML with current values?

I want to (programmatically, of course) add an event listener to a list (array of objects) of HTML input fields that will fire a change event but provide the value that is currently in the input and not what was in the input fields at the time the function that does the adding of events, runs. After...
BlackRece
0

votes
0

answer
43

Views

Gridstack: Dragging widget from one grid into another, nested one

I am trying to create this behavior and not sure whether Gridstack supports it or not. I have 3 Gridstack grids: Grid1, Grid2, and Grid3. Grid1 is a standalone grid and Grid3 is nested inside Grid2. I need to be able to drag widgets from Grid1 both into Grid2 (outer grid) and into Grid3 (nested gr...
Yuriy Galanter
0

votes
0

answer
5

Views

How to set checked attribute to radio in litelement

I would like to know how to set checked to radio button using litelement. I have a object and for each object options, radio button is created. For example, for id=SG two radio buttons are created, if no checked, set bank as default checked else set corresponding selected radio value as checked. I...
sowmiya
1

votes
3

answer
219

Views

DataTables+Datepicker filter table by date range

Trying to implement DataTables filter by date range using two bounded datepickers. I've seen few similar questions at SO, but none of those having answers worked for me. So far, I managed to implement interface elements, but have no idea as of how to put them together to proceed further. Any help i...
user10894089
1

votes
2

answer
53

Views

How to add multiple ckeditor using class in a one page?

I am trying to add multiple ckeditor using single class in a page. By clicking on add more link I want to add dynamic ckeditor. Following is my code. CKEDITOR.replace( 'editor1' );
vishal karkar
1

votes
2

answer
62

Views

Asynchronous AJAX return after page loads

I'm using Spring MVC and I need to make an asynchronous call to the server only once when the JSP page has loaded completely. What I actually have is a Controller that returns a List. I call the Controller using AJAX. The problem with my solution is that I'm not able to get the data of List after lo...
1

votes
2

answer
81

Views

JSON string from server side not coming properly using ajax jquery

What I am doing is, i am getting data from server side using mvc. The data is properly coming in return part. But when I m debugging in the client side, I am only getting the parameter value as [. Below is the JSON response which I am getting. [{'VENDORNAME':'ABC','VENDORCODE':'1234'},{'VENDORNAME':...
B N
1

votes
2

answer
28

Views

Then Inputtext lost mask when Edit information, what´s wrong?

I need show the mask in InputText field after click in hiperlink for Edit information in my FORM. When I access the form in first time the inputext fields show me the masks correctly. Follow my code: CPF $('#inputcpf').mask('999.999.999-99'); And the EDIT part of code: After clicking on the link the...
Mauricio Sanches
1

votes
5

answer
41

Views

Looping a button click event in jQuery

This loop doesn't seem to be working, I'm not sure where i'm going wrong but would appreciate any help. var j = 0; for (j = 0; j < 10; j++) { $('#btn-' + j).click(function() { alert(j); }); } One Two Three Four Basically on the click of the button it should alert out the number the loop is u...
FoxyFish
1

votes
2

answer
28

Views

Javascript clone/append either affects the wrong image or all images

I have a pretty basic function that gets a result set of images based on search input function appendSomeItems(url, id, name, style) { return ' ' + name + ' ' + style + ' '; } This works perfectly fine, and it is called in another function that basically gets up to 10 images from the result set and...
Tom N.
1

votes
4

answer
40

Views

jQuery sum the values of table rows

hello i have this table i want to get the total of each row in the total column jQuery //Monthly Marketing Cost Report $.get('/dashboard/costs', function(data){ $.each(data,function(i,value){ var leads = $('#leads'); var budget_total_year = $('#full_year_cost'); var budget_total_month = $('#share_...
mohamed adel
1

votes
2

answer
29

Views

To reset elements of one select2 dropdown on selection of another select2 dropdown

I have two select2 dropdowns as below. Fruits Vegetable(s) Basically I want to remove selected value from one dropdown on change of another drop down. So this is my code in Jquery. $('#SelectedFruit').on('change', function (e) { $('#SelectedVegetable').val('').trigger('change'); }); $('#SelectedVege...
TheFallenOne
1

votes
1

answer
39

Views

Why my ajax function are not working on infinite scrolling?

I am building a webpage having infinite scroll using waypoints.js with backend as Django.The problem is, my jquery and ajax functions are not working on newly generated content while they are working with content on first page. **EDIT:-**I am updating my code so that it will be easier to undertsand...
Gagan
1

votes
2

answer
39

Views

PHP variable to ajax, using variable inside jQuery function?

I am trying to send a variable with PHP to jQuery where I want to use this variable to append to a specific div. Here is how I send the variables to jQuery onclick :
jockebq
1

votes
3

answer
78

Views

How can I loop through three div boxes at the time

I have a list of 12 posts wrapped in a div tag and the structure looks like this: Is there a way I can loop every third div with the class of content in another div tag? At the end I would have my structure like this: Is there a way I can loop every third div with the class of content in another div...
deSousa
1

votes
2

answer
41

Views

Exit main function from inside forEach loop inside nested function [duplicate]

This question already has an answer here: Breaking out of an inner foreach loop 2 answers I have a JSON object that contains an array of objects. I also have an array of desired values, and I want to search for these values inside my JSON. I only care about the first match. If no match is found, th...
Matheus Leão
1

votes
1

answer
27

Views

Bold specific letter in a string [duplicate]

This question already has an answer here: Style a substring in javascript 1 answer I am working on the following code. How can I Bold the exact letter only in the group of element which has that character? I am not wanting to bold entire string (as I am able to change the font weight of the entire...
Mona Coder
1

votes
2

answer
20

Views

How can you create a variable shared between methods in a jQuery 'on' object?

I'm trying to have some logic both on hover and when the user left (and maybe clicked inside the window) the hovered element: jQuery('.element').on({ mouseenter: function() { }, mouseleave: function() { } }); The problem is that, for each method, mouseenter and mouseleave, I'd have to re-initialize...
coolpasta

View additional questions