Multiple droppables: How to detect the droppable, which did not accept the draggable?
I'm not familiar with jquery ui in depth and didn't find a solution for the following simple setting: I have a gallery with different kinds of waste and two trash cans, one for paper and one for 'bio'. When the user drags #waste_1 and drops it on #paper everything is ok, because .paper is accepted in #paper. In case that the user drags #waste_2 and drops it on #paper it should revert and #paper should shake. Revert works fine but I didn't find a way to detect the droppable when the waste is not accepted.
Fetch previous and next element with a certain condition
Lets start with a sample source: <hr> <p>....foobar...</p> <hr> Now I want to delete all <hr> elements which are immediately a) BEFORE a <p> element which contain "foobar" b) AFTER a <p> element which contain "foobar" If I code for example $("p:contains('foobar')").prev().remove(); then elements might be delete which are NOT a <hr> element So how can I specify otherwise the delete statement of a sequence of elements with one condition? Peter
Y-m-d format subtracting when set as value
For the life of me I could not understand why when I was storing today's date and then setting it as a value it was coming up as 199* instead of 2018-07-0*. How do I set the value of a text input for today's date in the Y-m-d format without it subtracting? HTML <input type="text" id="delivery_date" name="delivery_date" placeholder="" data-mask="9999-99-99" class="form-control" size="4" required> JS document.getElementById('delivery_date').value = user[0].delivery_date;
Problem with mouseover
trọng điểm Thẩm Mỹ She Spa Lily Maymac vốn nhỏ con thật chứ chẳng hề tiêu dùng ảnh ảo trên mạng đâu, chiếc chính là "hot girl môi tều" sở hữu chiêu chụp ảnh để lúc nào cũng gợi cảm và sexy nên mới khiến cho người ta bất ngờ lúc gặp ngoài đời. Để thực hành phun xăm môi khi không người dùng với thể tới thẩm mỹ viện Tiểu Yết tại số 88, nai lưng Duy Hưng, Cầu Giấy, Hà Nội. bây giờ Phú Quốc đã đặt tên thương hiệu đa dạng cho đặc sản độc đáo này là tiêu Phú Quốc” nhằm đảm bảo giá trị của sản phẩm này tương
using katex.render() in panel crashes
Hallo there, I try to use katex equations within panels, but it dont work properly. How can I use katex inside panels. Where should I call katex.render()....? The code-example is attached.. Thanks in advance! Bernd
jQuery contact form reply showing up on a bank white page not sure why
jQuery contact form and the for, is submitting but the reply showing that it was sent is showing up on a bank white page not sure why, want it in the place were the form is any ideas to help with code????? jQuery(function() { // Shorthand for jQuery(document).ready(function() { // if (jQuery('.comments-form,.contact-form').length > 0) { Modernizr.load([{ load: ['js/jquery.form.js', 'js/jquery.validate.js'], complete: function () { jQuery('.comments-form,.contact-form').validate({ //
Conflicting form ids
I have the following example where I can highlight the select values of a specific column. Sometimes I need to use two forms for the same column (hence the same form id), but it doesn't work when I try this. Is there another solution for this? My jsfiddle example: https://jsfiddle.net/1mt7ojL0/ As you can see in the example, Values.II form doesn't work.
new to coding and jquery code not working
new to coding and jquery code not working please help not sure were problem is?????? please if anyone can help the code emails but doesn't show on screen that it went if (jQuery('.comments-form,.contact-form').length > 0) { Modernizr.load([{ load: ['js/jquery.form.js', 'js/jquery.validate.js'], complete: function () { jQuery('.comments-form,.contact-form').validate({ // Add requirements to each of the fields rules: { name: { required: true, minlength: 10 },
Validation only highlights one field at a time for form requiring checking one of the checkboxes
I had to manually add validation for checkboxes for this Bootstrap page and now only one text field form field highlights at a time. For example, clicking submit once will highlight "First Name", clicking it a second time will highlight "Last Name" and so forth. We need all blank required fields to highlight at the same time. I used to include all form field names below within "rules", but no longer need to do that, since we're using Bootstrap's default validation. However, I haven't found a more
Tablesorter plugin: How to sort text/number column?
Hi All, I have a table with a sequence number column, and the values are like: 1-1, 1-2, 1-3, 2-1, 2-2, ...10-1, 10-2,... I use the tablesorter plug to give the table the sortable function, but when I try to sort the sequence number column, it gives me the order of 1-1, 1-2, 1-3, 10-1, 10-2, 2-1, 2-2,...which is not I want to get. I need it be ordered as a number, not a string (before and after the '-' part). I studied the tablesorter plugin document, and there are no related articles. The only similar
hover working indepedently with identical containers
Hello! I have a .container containing .wrapperA (image) and .wrapperB (image). And use this code to make .wrapperA invisible and .wrapperB visible on hover: $(".container").hover( function() { $(".wrapperB").fadeIn(1000) $(".wrapperA").fadeOut(1000) }, function() { $(".wrapperB").fadeOut(1000) $(".wrapperA").fadeIn(1000) } );EDIT: The problem is that I would like to add
updating code from attr to prop
In the process of moving some jquery code to a site that uses a newer version of jquery, I had to change from using attr to prop as shown below. jquery-1.3.2.js if (!($("[name=jobs_ws]").attr("checked"))) { jquery-1.10.2.js if ($("[name=jobs_ws]").prop("checked")) { After reading up on attr vs prop I'm still unclear on which attr and removeAttr should be clanged to prop in the code below. Currently the only problem is that only in IE11 the checkbox for "phone_appointment" and "have_file" are not
i have two effects that superimpose, the over effect and indicated click tab
this is mi code thanks for our attention: https://pastebin.com/3TdvCBvS
jQuery multiple content sliders?
How can I change the jQuery code below to have multiple content sliders working? When I try and add additional sliders it doesn't work correctly. CodePen https://codepen.io/anon/pen/aKPReW Any help is much appreciated. Thanks in advance! jQuery var allSlides = $('.slide'); var activeSlide = 0; setInterval('autoSlide()', 4000); $(".slider-next").click(function() { if (activeSlide+1 >= allSlides.length) { allSlides.eq(activeSlide).removeClass("active"); activeSlide = 0; allSlides.eq(0).addClass("active");
parsing xml using jquery (malformed xml)
I have an XML that looks like this: <?xml version="1.0" encoding="utf-8"?> <export> <Article URL="test"> <DisplayName>test</DisplayName> <Summary>test</Summary> <ThumbNail ID="test" URL="test" /> </Article> </export> Which I'm looking to parse using jQuery. This works using the following code: $.ajax({ url: 'https://[fqdn]/[filename].xml' }) .done(function(xml) { $(xml).find('Article').each(function() { console.log($(this).attr('URL')); console.log($(this).find('DisplayName').text()); console.log($(this).find('Summary').text());
JQuery UI css and js file locations
I am new to using JQuery UI and I was wondering if the css and js could be stored in different folders or if they needed to be located in the same folder?
Finding the total of array between two indexes.
Hi, if I have an array like this: scores = new Array(5,2,4,6,8,9,10); How would I get the total value of the items from index 1 (2 in this case) and index 4 (8 in this case). So scores would return the value of 20. Thanks in advance.
This drop and drag jaquery is applicable for iframe?
I have used this jquery where is video gallery contains both video and you tube video which are taken from iframe but it seems that video is working for drop and drag and iframe is not working? is there any solution for iframe drop and drag.
Error $x is not defined in chorme console
When i use below code $x("//*[@id='popular-movies']/div[1]/ul/ul[1]/li[1]/a")[0].click() Its working, But when I use setTimeout function with this code $(function(){setTimeout(function(){$x("//*[@id='popular-movies']/div[1]/ul/ul[1]/li[1]/a")[0].click()}, 3000); }()); I got error, $x is not defined Can you help me to solve this?
Flickering behaviour of ui sortable
I have a nested sortable list. No matter what i try, the sortables doesn't work correctly. None of the answers in jQuery forum regarding the issue helped me. When i try to sort second test parent into test child of first test parent the placeholder flickers (violently at times) and vice versa. I have searched for solution but couldn't find any. Tweaking css such as margin and padding may help was the only advice i got. But still no way. I am stuck since months. Here is the fiddle
Jquery card scanner activation, possible?
I'm posting this as a newbie and hope I'm not out of line, here goes. I have found a jquery card scanner script https://github.com/CarlRaymond/jquery.cardswipe also a jquery slot machine web app https://github.com/josex2r/jQuery-SlotMachine When a user taps a button the reels spin like a slot machine. I run a coffee shop, my aim is to issue "Coffee Membership" cards. I will display the juery slot machine in a tablet on my counter. The tablet will have a card reader attached. When a member pays
I can not call plug-in
Bom dia, não consigo chamar a validação do plugin jquery no meu código html, pela CDN como posso proceder?
Click problem
Charm Wiktionary Tiếng Việt Lily Maymac vốn nhỏ con thật chứ chẳng hề dùng ảnh ảo trên mạng đâu, chiếc chính là "hot girl môi tều" với chiêu chụp ảnh để khi nào cũng gợi cảm và sexy nên mới làm cho người ta bất thần lúc gặp ngoài đời. giả dụ chẳng may mang đôi môi xỉn màu, thâm bạn sở hữu thể áp dụng các bí quyết trong khoảng những nguyên liệu đột nhiên dễ kiếm đưới đây để tăng cường nhược điểm, tác động tích cực đến việc đôi môi tươi sáng, mềm mại, đỏ hồng lôi cuốn. 4. Khám phá Gành Dầu: Gành Dầu
using jquery with bootsrap4 and accordion
I am using an accordion menu, and at the moment the last level is the question, the two levels above it are sections and then categories at the top. Everything is fine, but what I want to do at this stage is detect if they go to the question level and open it, but then rather than close it they click another section instead. So if they do on clicking on any other button it closes the question accordion. This is how my question level is set up <div id="accordionQuestion@(Model.QuestionID)"> <div
getJSON and apostrophe/single quote as a parameter value in IE
I have a problem with the AJAX call on IE11 when parameter contains an apostrophe. AJAX call looks like: $.getJSON( "https://fqdn.to.server:8888/pdqm/endpoint", { firstName: self.firstName(), lastName: self.lastName() }, function (data) { //here is some stuff to do with UI } and when using is search for an example O'Connor it create call to https://fqdn.to.server:8888/pdqm/endpoint?firstName=*&lastName=O'Connor which works fine with Chrome and FireFox but when used with IE11 it doesn't encode apostrophe/single
Autosave form every X seconds
Hello All, I'm trying to add auto-save functionality to my form. While I figured out 90% of the things of the overall functionality, I'm stuck at the most crucial one - triggering the ajax call when - 1. Any of the form field is updated. 2. Ajax call is made every 10 second after the change is made. 3. No ajax call is made when the fields are empty I experimented with ``` $(":input").keypress(function() { setInterval(saveDraft(), 5000); });j function saveDraft() { ... } ``` However,
adding different classes when coming from different pages
Hello! On load of my index page, I have a js running: $(document).ready(function() { setTimeout(function(){ $("body").addClass("item1") I am leaving this page to page2 and returning to index. Now I want to add: $("body").addClass("item2") If I come from page3 I want item3 to add. How can I achieve this?
How to sanitize data sent from the server in ajax call ?
I have the following quiz component here. There are 10 questions and on click of the result of the final question , your performance of the over all quiz is shown, the response is fetched though a ajax request (in scripts.js) , like so: $.ajax({ type: "POST", url: $("#quizForm input#QuizResultPreview").val(), dataType: 'html', contentType: 'application/json', data:JSON.stringify(quizAttempt), success:
Highlight highest value in table cell
I have this metod to highlight highest value in table cell: var max = 0; var bg = 0; $(this).find('.my-table').each(function () { $this = parseInt($(this).find('tbody tr:eq(1) td:eq(0)').text()); if ($this > max) { max = $this; bg = $(this).find('tbody tr:eq(1) td:eq(0)'); } }); bg.addClass('highlight'); It kinda works but not as I would like.
How to NOT pass 'Other' option for SELECT
How can I NOT pass anything from a SELECT when "Other" is selected? Selecting "Other" opens a separate text field that'll pass the answer when the form is submitted? FORM CODE <div class="form-group"> <label for="fruit" class="control-label">If you were a fruit, you'd be a(n).../label> <select id="fruit" name="fruit" data-value="fruit" class="form-control"> <option value="" selected>-- Please Select --</option> <option value="Apple">Apple</option>
JQuery Mobile Toggle-Switch in Listview
I'm trying to build a mobile Webinterface with Jquery Mobile. I've got three questions: How can I set css tags for #List li a h2 and #List li a .ui-li-aside? How can I center the toggle switch on the right size? How can I call a different Function by Click on the Toggle Switch, than by a Click on the Listview-Element? Since I'm new in Web Developing, it would be nice if someone of you can answer my questions. This is my Source Code: <!DOCTYPE html> <html> <head> <meta name='viewport' charset='utf-8'
own (string) function via $.fn
I'm a C#.NET developer and in JS/jQuery I missing the... "String".Replace("old","new"); ...to replace all "old" substrings with a "new" substring inside a string. jQuery code: $(document).ready(function(){ alert(('Hello [WORLD]. How are you, [WORLD]?').strReplace('[WORLD]','Michael')); $.fn.strReplace = function(find,replace) { return this.split(find).join(replace); } } console output: [jquery-3.3.1.min.js:2] Uncaught TypeError: "hallo".strReplace is not a function
validation plugin - two languages
I am sorry, but i cannot find any solution, how to have a multiple language error messages. When I use localisation javascript file messages_cs.js, the english is not working anymore, when I validate form from browser which has english in default settings and . The documentation of jquery validator plugin tells nothing about this problem. . When I ask google search for°"jquery validation multiple language error messages" - there is a lot of results, but nothing works... My website is in english
dialog relativity
Hi, I have aspx page that contain another aspx within <IFRAME > tag. When I use jQuery dialog it shows relative to the iframe document, what I want is the dialog to show relative to the parent aspx (the browser viewport). How can I make it happen ?
question about improper function ?
trying to make a dropdown menu clickable on and off... but also be able to turn it off with clicking outside of it. This works great (this is just for the turning it off part, getting the menu to drop down is working fine): $(document) .mouseup(function (e){ var ch = "#dropdownmenu"; if (!$(ch).is(e.target) // if the target of the click isn't the container... && $(ch).has(e.target).length === 0) // ... nor a descendant of the container { $(ch).hide(200);
Copy all form field values to Clipboard
I am developing a form, that once complete, will have a button that copies ALL form field values to the clipboard, to be pasted in an offline document I have figured out how to do this for one field, but get nowhere when trying to add multiple values. I have read about getElementsByClassName, and document.querySelector, but also, can get neither to work, Below is my working code for only one field: *********************************** <input type="text" value="" id="Field1"> <button onclick="myFunction()">Copy
HIde button if all fields are blank
Hello. I have a form that runs a script when the button is clicked. I would like to add a feature that hides the button if the fields values are blank, and show it once all the fields contain a value. I have this working script below, which fires an Alert on this condition, but don't know how to change it over to hide the button. <script> function formcheck() { var fields = $(".myForm") .find("select, textarea, input").serializeArray(); $.each(fields, function(i, field) { if (!field.value)
jQ UI dialog problem on MS EDGE
gents, I have a problem with jQ UI on MS EDGE. I was able to isolate the problem to my repo here : https://github.com/rostacik/jquiedgeproblem I am using this - https://www.npmjs.com/package/http-server - nodejs based server to serve my files from the folder so git clone and running http-server will get you the same setup I use. repro steps : go to html/page.htm click on button "call iframed window" modal jQ UI dialog will appear click to the right (on the body) of the button - you should hit the
Adding jQuery to Blogger
I have posted a HTML code File in Blogger.com In that I have included jQuery codes. That jQuery file was in my PC now as I have posted it in the website the code is not working due to missing of jQuery file I added this tag in the <head> <script src='http://ajax.googleapis.com/…/jquery…/1.8.23/jquery-ui.min.js' type='text/javascript'></script> But still not working . ASAP help needed Plz......
Enable draggable object after taphold
Hello jQuery-Community, I am using the jQuery UI Draggable Widget for objects inside a div with overflow. For enabling touch gestures I also included the jQuery UI Touch Punch hack. Instead of using the handle-option for enabling the Draggable Widget for a specific element, I want to be able to enable it for the whole object after an taphold event. So I could be able to either scroll the div by swiping up and down or drag the objects by a taphold. Is this possible? I know I can disable and enable
Next Page