want to copy dragable element. But my code is cutting the element and pasting it on the dropzone
I am using this to drag and drop element $(".drag-able").draggable({ appendTo: "body", cursor: "move", helper: "clone", revert: "valid" }); $(".drop-able").droppable({ tolerance: 'pointer', drop: function (event, ui) { $(this).append($(ui.draggable)); }, }); but it disappearing the original element. I want to drag the element to a new position by keeping the original one on its position. Is this possible?
Changing hidden field if any checkbox is checked
I've obviously got something wrong here. How do I pass a "interestsYes" or "interestsNo" to a hidden field based on whether any of eight checkboxes are checked? Here's what I have, which basically says, "If any checkbox is checked, set the hidden field "interestAny" to "Yes". If no checkboxes are checked, set the hidden field "interestAny" to "No". $(document).ready(function() { if ($("#clientForm input:clientInterest:checked").length > 0) { $('#interestAny').val($(this).val('Yes')); } else { $('#interestAny').val($(this).val('No'));
Jquery-UI draggable: Problem with “over” and “out” event when droppable changes size dynamically
I'm working on a project whare I need to allow drag and dropping from a sidebar to some content. It is very important, that the content (when hovering it with the draggable) expands with applying some padding (to the inner content, in the example code an image). When I enter the droppable with the draggable, the padding is added, which makes the droppable a bit bigger in size (both width and height). Jquery UI does not "recognize" this change in size, it means that when I move the draggable a bit
how to get ID value from class?
I have 5 images in my console, I am getting undefined badge_img1 undefined badge_img1 undefined badge_img1 undefined badge_img1 undefined badge_img1 I'm expecting t o see: badge_img1 badge_img1 badge_img2 badge_img2 badge_img3 badge_img3 badge_img4 badge_img4 badge_img5 badge_img5 here is my html: <?php while ($row = $statement->fetch()) { ?> <div class="sticker"> <input type="hidden" class="stickerid" id="<?php echo $row['stickerid'];?>"> <input type="hidden" class="path" id="<?php
Safari - jQuery dragging with “filter: drop-shadow()” leaves traces
I have a <div>, that can be dragged using jquery draggable. This action leaves traces in Safari, but works in other browsers. Found similar (old) issues in Chrome regarding repaint, proposing solutions to use outline:1px solid transparent but hat does not help here. This question is also asked on stackoverflow but no answer so far: https://stackoverflow.com/questions/53208588/safari-jquery-dragging-with-filter-drop-shadow-leaves-traces You can see a demo here (open it in Safari): https://jsfiddle.net/qzLjcagt/
video time update events
Hi please note this is designed for touch screen devices only at the moment although it should work with your mousewheel. I've successfully gotten a nice video scrubbing action going here: (please note you have to swipe the screen or roll the mouse wheel to activate) http://www.mediaflash.ca/swipe_video_timeline/index.html this relies on scroll position to scrub the video timeline. At the time update we see the animation event occur. (divs animate and are displayed) however I cannot figure out how
load() function problem
Is there any possibility to load collapsible set from external html page to panel on main page without html header on external html page? When I create external html page without header (js and css files) and load it into div on the index.html, the loaded content ignores js and css from index.html page. Because it needs "data-role=page" div on external html page, but i do not want to have "data-role=page" on external html page. I need only the collapsible set.
The value of the property '$' is null or undefined, not a Function object
Hi all I am pretty new to using J query. I keep getting this error in IE but my code works just fine in code. How do i remedy it? <head> <!-- Remember to include jQuery :) --> <script type='text/javascript' src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0/jquery.min.js"></script> <!-- jQuery Modal --> <script type='text/javascript' src="https://cdnjs.cloudflare.com/ajax/libs/jquery-modal/0.9.1/jquery.modal.min.js"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-modal/0.9.1/jquery.modal.min.css"
Sort list item by it's value
So if I have a list like this <ul> <li>2</li> <li>4</li> <li>1</li> <li>3</li> </ul> How can I sort them so they end up like: <ul> <li>1</li> <li>2</li> <li>3</li> <li>4</li> </ul> ?
autocomplete separated words
I have an autocomplete input with an array of elements with the following format citi-state, for example miami-florida Id like to permit the user to find the city and state in different orders, for ecample: miami fl florida mi How do I configure the autocomplete for this? Thanks a lot, Programador Ari
jQuery Mobile Security Issue
Has anyone got any comments about the jQuery Mobile Security Issue mentioned here ? https://github.com/jquery/jquery-mobile/issues/8640
Upgrading JQuery Versions - Finding / Identifying / Correcting
Good Evening Everyone, I should first start with I am on the Security side of the house and hoping to help my development side a bit (While they are helping me of course). From a PCI Scan we have been working on correcting a. jQuery Core rquickExpr variable with Cross-Site Scripting Vulnerability, CVE-2012-6708 b. jQuery Cross-Domain Asynchronous JavaScript and Extensible Markup Language Request Cross-site Scripting Vulnerability, CVE-2015-9251 This has primarily been finding, replacing
Ajax photo uploader only works when I add debugger;
when I step through the debugger in Chrome browser, my image actually uploads and inserts into the database otherwise it doesn't seem to get into the saveDesign.php Please help? $("#sub").click( function(){ debugger; var canvas = document.getElementById('canvas'); //var context = canvas.getContext("experimental-webgl", {preserveDrawingBuffer: true}); var dataURL = canvas.toDataURL({format: 'png' }); document.getElementById("canvas").src = dataURL; $.ajax({ type: "POST",
Clicking on sortable item prevents input's on change event
I am having an issue where if the user types in an input but doesn't leave the input before clicking on a sortable item, the change event for the input does not fire. Here's a jsFiddle that shows the issue. Any suggestions or is this a bug? Thanks, Reid
I can't understand- He assigned value to a varaible.The value is geeting from the find method . He checked 2 conditions .one for selected length and one for image length.Explain please.Thankyou
$('#image-selections .image-selection-row').each(function(index, selection_row){ var row_index = $(this).data('select-index'); var $selected = $(selection_row).find('.image-select.image-selected'); if( $selected.length ){ var $light_img = $('#image-bar-container img.img-flash[data-img-index="'+row_index+'"]'); if( $light_img.length ){ $light_img.attr('src', 'folder/im-' + $selected.data('pixel') + '.png' ).addClass('light-active'); }
Autocomplete jquery inputToken with PHP
Hi, I try to use the plugin "inputToken" but I cannot display the result list returned by the concerned research. You can find the HTML code below : <!DOCTYPE html> <html lang="fr"> <head> <meta charset="UTF-8" /> <meta name="description" content="website"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Website</title> </head> <body> <form action="#" method="post" role="form"> <div> <label for="collaborators">Collaborateurs</label>
ajaxSuccess/ajaxComplete not working
Hi there everybody, as you will guess, I am new to Ajax so would appreciate a little help if possible. I have a JQuery function which sets the width of a div within a table row and then animates the contents to slide up for pagination effect like so: <script type="text/javascript"> $(document).ready (function () { $('.change').each(function () { if ($('.p p', this).height() > $('.time').height() || $('.p p', this).height() == ($('.time').height() * 2)) { $(this).css({
Need to migrate jquery 1.11.1 to jquery 3.4.0
Hi All, Anyone please guide me how to migrate jquery 1.11.1 to jquery 3.4.0 in asp.net vs 2015 application. Many thanks in advance. Thanks & Regards, Nidhi
Warning MutationObserver responsive
using newest version of jquery 3.4.0 shows following warning: "Use of Mutation Events is deprecated. Use MutationObserver instead"
How to insert a (line)break after (each) <h3> element?
Lets start with a sample code: <h3>title line</h3> <figure .....> <img ....>....</img> <div>...</div> </figure> <div>...</div> When I print a webpage into a pdf file then it happens occasionally that the image is visually appended right of the h3 headline. I don't want this. Such an image should ALWAYS be placed immediately BELOW a <h3> headline. So I would like to insert (from a jQuery script) something like a hard line break after each <h3>....</h3> element. How can I achieve this? A <br/> seems
jquery block blockUI cdl ?
block/block is a very useful plugin. is there a cdn available for block/blockUI plugin? or is github used as the cdn? also, is this plugin actively maintained? it appears there has been no activity for a few years.
Get Post Data from Jquery Multidatespicker
This is a very basic question. I don't know how to get the post data from the jquery multidatespicker. When I submit the page I want to echo back the post variables but I don't see how they're sent with jquery.
Having problems creating layout.cshtml in Visual Studio 2017
I've found tons of great examples of Jquery Mobile applicable to Visual Studio developers - all using older Visual Studio MVC templates i.e. they have the App_Start folder, use bundling, etc. where the 2017 Visual Studio/MVC has done away with both of those constructs. ALL i want to is create my first simple test app using jquery mobile (single listview control). I can cut/paste code via notepad into an HTML file, double click it, and it displays exactly as expected. But I have not been able to
Old code and .ajax()
Hi everyone! I'm working to renew some old site that uses very old jquery (for example, it does not know what the ".html()" method is. It uses .update() instead of this). When i replace the old library with a new one (the last) - all site's jquery functionality crashes... But i need to use .ajax (instead of the old ajax.request() ) to be able to get data from other site. If i leave the old library - i got "Uncaught TypeError: $.ajax is not a function" in console, but if i place the old library and
diagonally slider
I am facing same issue https://forum.jquery.com/topic/diagonal-scrolling-using-jquery-javascript please anybody help..I dont know where to start...
jQuery Migrate plugin in production ?
We are upgrading the jQuery version from 2.1.4 to 3.4.0 with the help of jQuery Migrate plugin 3.0.1 looks like plugin restores deprecated features and behaviors so that older code still run properly with out any code modifications. Is it fine to use jquery-migrate-3.0.1.min.js in production systems which does not generate any console warnings ??
Identify an element without class or ID
I am a total novice at javascript and jquery. I can sometimes understand the code I see, but have no idea how to write it. I have a SharePoint page that I wish to modify two specific <td> elements without modifying the master page. There is a <table> with a class that contains these two <td> tags. Please see the relevant code below. I am attempting to change the width value of each of these tags. Any help would be most appreciated. <table width="100%" class="ms-welcomepageheader" > <trbody>
understanding $(function())
Hi everyone, It has been a while and logging in through Zohoo its a zoo... Anyways, I am trying to understand the following function $(function()? I have a page that is my Log screen that I would like for it to load, but for the program flow, not go directly to $(function() {}); I tried the following, but it didn't work: $("Enter").click(function() { $(function() { bla, bla, bla, }); }); Please let me know if this makes any sense or if more info is needed and what type. Thanks,
Change button class when ALL fields are selected
I'm trying to execute a script where, when all select fields have been selected the submit button becomes active and the user can send. Beforehand though, I want the button inactive (working) and a class adding called 'inactive'. What I'm finding is, once one of the (four) selects has been selected the class gets removed and can't understand why as the button stays inactive until all four have been selected.... jQuery('.stage_two_btn').attr('disabled', true).addClass('inactive'); jQuery('.product_lead_class,
invoke doPost in java servlet through ajax
Hey.=) I'm trying to invoke my doPost method in java servlet through ajax command. Don't seem to get it right. I got this code in the doPost method in my servlet: String title = request.getParameter("title"); String price = request.getParameter("price"); String quantity = request.getParameter("quantity"); // and alot more codeGot this code in my HTML: <span>Title:</span> <input type="text" name="title" /><br /> <span>Price</span><input type="number" step="0.01" name="price" /><br /> <span>quantity</span><input
Please help with return dialog
Hello, I really need help with this, I am new to jquery and I just made a page with 3 ul with some li that you can switch between them, and I made a dialog that when you click it returns what's in every ul, What I don't know how to make is how to return what's on that moment on the ul, please I really need help, here some pictures:
Drag and Drop issue
When drag the li for the first time it will work and when clicked on close button and again i drag the second time it will not working for dragging
append ul list with li inside
Hey.=) Trying to append a ul with a few li inside and i can't get it right. numberOfEntrance is the div that i want to contain the ul. This works for me: $("#numberOfEntrance").append( $("<ul>").append( $("<li>").html("li1") ) ) And when i try to append a multiple li: $("#numberOfEntrance").append( $("<ul>").append( $("<li>").html("li1") + $("<li>").html("li2") ) ) Have no idea why when i try to append multiple li i get [Object object] and not a li with html in him. Thank you anyone who try to
globalize is undefined
I am relatively new to C# MVC 4 development, but a long term web developer. I am currently working on a project that needs to perform date validation based upon Australian date formats. I have jQuery 3.3.1, jQuery Validation (Jorn Zaefferer), jQuery Validation Globalize (John Reilly) 1.1.0. Scripts are loaded in the following order: <script src="/Scripts/modernizr-2.8.3.js"></script> <script src="/Scripts/jquery-3.3.1.js"></script> <script src="/Scripts/bootstrap.js"></script> <script src="/Scripts/bootstrap-datepicker.min.js"></script>
AJAX Loop and Wait
I have a script/function where I want to call a page/script via ajax. Once that's completed, call another and once that's completed a 3rd and so on. How can I do something like this?
Issue on Filtering Elements by Multi Checkbox Groups
Can you please take a look at This Demo fiddle and let me know how to fix these two issues here I am trying to create a simple filter ui using this code but I have two issue here 1- Filters by Color is not working if you start with them. They work if user first filters by Shape first . 2- on Filter by Shape if you select square it will filter the boxes correctly but if you unchecked thesquare it will remove all boxes (which is not correct it should display all boxes now) Can you please let me know
Need help)
Hi. Whats up? I an mewbie and just cant understand how to finish my work. I need to create input by touble clicking on td and after "enter" save a changed. So all is ok, but after pressing enter, all tds being chaged. so how can i change only one? <!DOCTYPE html> <html> <head> <title></title> <style type="text/css"> .ta{border: 2px solid black; border-collapse: collapse;} tr td {border: 2px solid black; border-collapse: collapse; width: 100px; height: 20px;} </style> </head> <body>
How to get two values in AJAX with same condition?
How to get two values in ajax : Source-code : 1) database.php <?php $servername = "localhost"; $username = "root"; $password = ""; $dbname = "kolupadi_extension_order"; $conn = mysqli_connect($servername, $username, $password, $dbname ); if(!$conn) { echo "Try after Sometimes" .mysqli_connect_error(); } ?> 2) upgrade.php (Form) https://paste.ofcode.org/Wi8Y3qZftCpSQEKYgjxe9k 3) ajax_data.php : https://paste.ofcode.org/33sxrJp9yTGRxbWpHrek7vY
Keeping Bootstrap modal open after form submission
I have a form in a Bootstrap 4 modal and am trying to replace this modal form with a thank you message within the same modal, but the modal keeps closing after the submit button is clicked. I tried the following, but it's not working. <button type="submit" class="btn btn-primary" onclick="$('#formModal').modal({'backdrop': 'static'});" >Submit</button> The goal is to submit the data to our db when the submit button is clicked and then hide the form and display a thank you within the same modal. Here's
How do you vertically center an image in ui-content ?
My ui-content is VERY simple, it's just a single image, really, nothing else, just a single image. <div data-role="main" class="ui-content"> <div style="text-align:center;"><img src="images/home_logo_600px.svg" class="fullscreen"></div> </div> The CSS for "fullscreen" is just a simple: .fullscreen { max-width:100%; max-height:100%; } So here is the question, by doing text-align:center; I have centered the image that is now filling up the width of the whole screen on portrait mode thanks
Next Page