Questions tagged [jquery]

jQuery is a Javascript library, consider also adding the Javascript tag. jQuery is a popular cross-browser JavaScript library that facilitates Document Object Model (DOM) traversal, event handling, animations and AJAX interactions by minimizing the discrepancies across browsers. A question tagged jquery should be related to jquery, so jquery should be used by the code in question and at least jquery usage-related elements need to be in the question.

Filter by
Sorted by
Tagged with
0
votes
0answers
9 views

What's the difference between a page load in a new tab or in a new window ,in terms of modal popup form functionality

Mvc modal popup form doesn't work when the page is opened as a new tab ,But its works when the page is opened as new window In Main page, I have dynamic tab which loads #Rep_Contracts , And in #...
0
votes
0answers
18 views

Multipart form submits and sends email but file upload fails with jQuery check

I have a simple HTML form that can be filled out and the information emailed via the POST method. I recently added a file upload to the form - If i do no checks with Javascript/jQuery then it submits ...
0
votes
1answer
17 views

ErrorException in Collection.php line 1043: Undefined offset: 0 in laravel

controller: HomeController.php public function index() { // home page redirect query $data['redirect'] = SiteSettings::where('name','default_home')->get(); $data['popular_rooms'] = ...
-1
votes
0answers
6 views

Mistake in page section scroll script to id with mousewheel

There is a site written with scrollr js pluggin. The example below or another additional link to the same example (https://codepen.io/RukUndead/pen/bXwyZJ) . The task is to make step-by-step scrolling ...
0
votes
3answers
40 views

How to add to a jQuery queue dynamically?

My problem is: I want to add animations to a jQuery queue dynamically. What I mean by dynamically is that the number of times, that I want this animation to be added to the queue, is some sort of ...
3
votes
0answers
44 views

Direct native JavaScript or jQuery method to get containing block of an element

Is there a built-in DOM API or a jquery one to get the containing block of an element? I am not asking how to get the containing block of an element. I am just asking if there's already the wheel so ...
0
votes
0answers
18 views

filter data according to dates

I want to filter data according to a given date range picked up in templates by user.I have a list I want that if User enter date and it matches with the date in a list then that data should be shown ....
0
votes
1answer
15 views

Is it safe to use .serialize() in user input?

Is it safe to use .serialize() in user input like in the ajax bellow? I don't know if it's related to security. $.ajax({ url: 'process.php', type:'post', data: $("#form").serialize() }) ...
0
votes
1answer
16 views

How to Make a jQuery Table Cell(td) clickable to Run a Function?

I am currently passing the button class to a function when the button is clicked. I want to switch from using buttons to using the td/cells in a jQuery table. So when I click on the image in the cell, ...
1
vote
1answer
42 views

Prevent the duplicate function onchange event jQuery

I have this snippet below $(document).ready(function(){ $("#selectTest").change(function(e){ if($(this).val() == "01"){ $(".show").hide(); }else{ $(".show").show(); ...
1
vote
1answer
19 views

How to change the backgroundand text color of the navbar on scroll in react.js?

I am trying to add a transparent navbar in react.js now i want to change the background and text color of the navbar on scroll . <div className="logo"> <a href='/'> <...
0
votes
0answers
15 views

Autocomplete is not showing result

“I’m trying to get firstname from database as a search bar using autocomplete function and then retrieve the lastname from database using submit button Here i have created a dashboard @app.route('...
-1
votes
1answer
27 views

Show popup message on tab close

I need to show the popup on the closing the browser tab/window. I tried the following methods but any of it does not work for me. $(window).on('beforeunload', function(){ return 'Are you sure you ...
0
votes
1answer
19 views

How do we assign the URL to the respective image which is randomly appearing?

The aim is to assign the respective URL to the respective image which is randomly appearing every 1 second on a web page in J Query. so was wondering how do i combine both random items together? I ...
-1
votes
0answers
9 views

Adding input numbers into date to set expiry

Check-in Date: <input type="date" id="checkInDate" > <br> Check-in Date: <input type="number" id="Number" > <br> Check-out Date: <input type="date" id="checkOutDate" ...
0
votes
1answer
16 views

How to correctly use jQuery extend

Let's have these objects: var a = { a: { b: [1,2,3], c: "a", d: "a" }, b: "aaa" }; var b = { a: { b: [], c: "" }, b: "b" }; I need ...
1
vote
1answer
20 views

Data attribute only returning first value

I'm trying to get the body of my page to change color when hovering over some list items. Each list item has its own color stored in a data attribute, which I can see in the chrome inspector. The code ...
1
vote
3answers
57 views

Is there another way to write line 6

I am new to jQuery and I am not familiar with the way of writing code in line 6. I just want a simple way to write and understand it (it is supposed to select the id "data-scroll" that equals blockID) ...
0
votes
0answers
14 views

Unable to hide the datagrid columns using jquery

Below is my grid binding logic in this grid I need to hide Department column conditionally that means if(admin == true) I need to show this column or else I need to hide this column how can I do this ...
2
votes
3answers
60 views

Put many function inside function in Javascript

I'm newbie in Javascript and wanna learn function to make own plugin. So first i'm learn about this: (function() { // Define our constructor this.Cms = function(){ this.Test = ...
0
votes
1answer
18 views

Bootstrap modals does not work anymore when integrated with Vue.js

My colleague recently integrated Vue.js with our code that still uses jQuery in many parts of it. The problem is that all of the modals in our application stopped showing if we tried to use JS in ...
0
votes
2answers
32 views

how to exit from loop after a ajax call

i have a table and I need to bulk updation. Before I need to check one column have no null value and the values are unique.So i loop the table.But how can i exit from the loop when same values appear ...
0
votes
1answer
25 views

How to fit iframe content size to its div area in bootstrap 4 when the window is shrunk?

I am builing a new website and want to fit an iframe which contain a video to div when the window is shrunk. Where do i need to set in the CSS ? Running Bootstrap 4.3.1 and JQuery 3.4.1. In the past, ...
1
vote
1answer
61 views

How to turn mouse arrow into finger pointer on clickable background?

I have a clickable two-part background wallpaper for my WordPress site. It works fine except for one thing: When hovering the mouse over the background, it remains an arrow instead of a finger pointer,...
0
votes
1answer
34 views

How to Replace Text Within Script Tags Using JQuery

We use a page builder (ClickFunnels) to build pages. On these pages are different scripts, e.g. Facebook pixel. We are cloning these pages a lot and run various tests. Currently, we update the ...
0
votes
1answer
13 views

Make different groups of “Gallery with one preview image” using fancybox

This is what I want to achieve -create different groups of items -just one group preview image -On click, it should open a slider of images related to only that group. This is what I have tried so ...
0
votes
1answer
30 views

Problem with Navigator.geoLocation.getCurrentPosition not working

I'm making a small mobile web app called "Chicken Logger" where the user selects a particular type of chicken and enters relevant data in the next page. My problem is I need to use Navigator....
-1
votes
1answer
41 views

Convert Base64 String to String Array

I am using request.getParameter and getting this value: [ "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAA0NDQ0ODQ4QEA4UFhMWFB4bGRkbHi0gIiAiIC1EKjIqKjIqRDxJOzc7STxsVUtLVWx9aWNpfZeHh5e+tb75+...
0
votes
1answer
15 views

Change elements css based on url multiple times without reloading page (AJAX needed)

I need to display element "theater-capacity" when user selects "theater" from a dropdown. Then show "banquet-capacity" when user selects "banquet", hiding "theater-Capacity". I'm tweaking a theme, ...
3
votes
2answers
63 views

Why is this CSS transition only working correctly on the some clicks? How to solve it?

I try to create a chain of CSS transitions with jQuery. The 1st transition is triggered by a click event and the 2nd is triggered by transition end event. The expected process is like this: click --> ...
0
votes
1answer
10 views

Retrieve owl-carousel item index when clicking on div inside this carousel item

I have an owl carousel with dinamycally added items and each of them contains a remove button. When I click on this button, I want to get the itemindex of the parent carousel item to call the remove ...
0
votes
1answer
14 views

How do I trigger toggling of an element with another on former element's hover

I have 2 buttons, a, and b that I want to toggle on hover of a but it keeps blinking in between because I think once a disappears, it triggers the mouseexit. They both have the same display position....
0
votes
1answer
22 views

Get window width and send as variable to flask

I'm trying to set the window width as a variable that will be sent along with some input text on-click to my back-end Flask program. The window width variable will determine which block of code will ...
0
votes
1answer
14 views

How to Set a Different Image for Each Row in a jQuery Table using CSS

I have an external file that creates a table using jQuery. I have figured out how to set a background image to the td attribute in css but as the table has 4 rows, each cell, in each row, gets the ...
0
votes
1answer
18 views

Every change done with magicscroll and greensock get reset when I hit the bottom of the page

I'm building a side dot navigation (with four dots) using ScrollMagic and Greensock. Everything work fine until I scroll to the bottom of the page. Then, when i scroll up, my dots are getting messed ...
0
votes
2answers
40 views

Enabling a button based on selected values

Fair warning I have super janky code. With that being said, I have my button disabled from the start, as to reduce the amount of human error that happens upon submission of my form. I need to enable ...
0
votes
1answer
28 views

Toggle button appears but does not toggle when clicked

I am trying to make a toggle button in Bootstrap. At low widths, the toggle button does show, however, it does not respond whenever I click it. At high widths the menu just shows on the top right, ...
0
votes
1answer
13 views

How can I append an element to a specific area of the page using pixels

I am trying to append an image to a specific area of my page (the middle). At the moment the image is appearing at the very bottom of my page. Could anyone advise me how to change the location of ...
0
votes
0answers
11 views

How to pass Array of checkbox data attributes as IEnumeration of Model from jQuery Ajax to the MVC 5 Action?

Long time developer new to JQuery, MVC, & C# I have a list of a Model (RZRCheckBoxModel) that include values to be displayed as check boxes. I need to retrieve all the checkboxes regardless of ...
0
votes
2answers
25 views

Rewite fetch function in jQuery.ajax()

The current solution using fetch We currently have this function implemented and working perfectly. function setupCKConnect() { fetch('ajax/myfile.php?id=1234567') .then(response => ...
1
vote
1answer
51 views

The footer to our website has disappeared on desktop version, not mobile, but relevant HTML/CSS hasn't changed

My small library has a website that was created in HTML and CSS by a previous employee. I know the the display of the site is dynamic based on screen size-- the mobile site is slightly different from ...
0
votes
1answer
34 views

How to select a specific div with specific class jQuery?

I have a circle, when I clicked on it 2 options showed up. <div class="col-sm-2" style="display: block;"> <span class="fa fa-mobile circle-icon fa-5x client" style="background-color: ...
0
votes
1answer
19 views

How to insert a jquery-ui DATEPICKER into a specifec div

I'm using Jquery-UI Datepicker "https://jqueryui.com/datepicker/" "I'm using it on two inputs" and when I click on an input and choose the date from the calender I want to make an effict on a sibling ...
0
votes
0answers
16 views

Bootstrap Modal appearing on right side of screen beacuse of css stylesheet link

I have this code that shows a bootstrap modal: function showmodal() { $("#ModalMSJ").modal("show"); } <link href="bootstrap/css/bootstrap.min.css" rel="stylesheet"> <link href="css/...
-1
votes
2answers
44 views

How to fix “jquery is not defined” [duplicate]

I'm using this a tutorial from Hackernoon, and I'm getting the error: jQuery.fn.sortDomElements = (function() { ^ ReferenceError: jQuery is not defined in the app.js file. I think it is because for ...
-2
votes
0answers
9 views

Download multiple PDF's from a website into folder after selecting all checkboxes for PDF's without getting 'saveas' dialog for each pdf

I need to access website with login information after which a screen appears. On that screen are listed some pdf files with checkboxes beside and also a download button. If all checkboxes are selected,...
-1
votes
0answers
29 views

Event listener or Mutation observer does not catch every change

I am trying to use Mutation observer or event listener as part of Chrome extension: var observer = new MutationObserver(function(mutationList) { for (var mutation of mutationList) { for (...
0
votes
1answer
23 views

How can I open 'Save as' dialog box for an Image in Chrome with the following Code by just using client side?

I have the following code for demo, I have added a button to save Image so that whenever User click that save as dialog box should appear to save and download the given image on Client System. <!...
-4
votes
0answers
16 views

Require assistance in configuring Jquery with my existing Code [on hold]

I'm working on Angular 8, and just started with the basics of jQuery. Looking for any guidance on configuration of jQuery in my existing application.
0
votes
1answer
20 views

Cannot add event listeners to cloned elements with JQuery - for CSS Animation

I am making a toggle button using some SVG elements that are animated with CSS animation / @Keyframes. As you would expect, you click the 'on' element (which in this case is a green svg circle) the ...