if screen size
I have the following code: $('ul.nav li ul').hide(); $('ul.nav > li').hover(function () { if ($(this).find('ul').length > 0) { $(this).find('ul').stop().slideDown('fast'); } },function () { if ($(this).find('ul').length > 0) { $(this).find('ul').stop().slideUp('fast'); } }); But i dont want it to execute if my screen size is below 560px, is there a way I can do this? I tried wrapping if ($(window).width()
IOS ipad and iphone jumping bug when focused on input (due to keyboard popingup)
Hey guys i have made the following demo here. basically when a user clicks on the input , the entire form goes out of view , this happens as the keyboard popups up , i have checked SO and other sites for solutions , and currently have the following solution applied in the live site: $('form input').on('focusin focus', function(e) { $this = $(this); $('html , body').animate({ scrollTop: ($this.offset().top / 2) }, 0); }); ofcourse this works perfectly if applied on the desktop
End of month a new date calculate
Hi, If the first date, for example, is 27/11/2017 (dtmmaa), the new calculated date (DTSCADX) must give me 30/11/2022. Currently the new date (DTSCADX) me since 27/11/2022. Thanks: <script type="text/javascript"> $(function() { $('.dtmmaa').datepicker({ monthNames: ['Gennaio','Febbraio','Marzo','Aprile','Maggio','Giugno','Luglio','Agosto','Settembre','Ottobre','Novembre','Dicembre'], startView: "months", format: 'dd/mm/yyyy', language: "it", todayHighlight: true,
How to interpret on what JQuery do?
Referring to following coding , I would like to know on how to interpret following coding as show below: //export that._eTTE('equity_future_export','xlsx',''+that.product+'_Futures'); // (1)'equity_future_export', (2)'xlsx',(3)''+that.product+'_Futures'); // there is only 3 parameters instead of 4, would it be correct? _s2ab : function(s){ }, _eTTE : function(id, type, name, fn){ // id = equity_future_export // type = xlsx // name = where is "'+that.product+'_Futures" defined? There is no _Futures
How do we use Jquery sortable "serialize" data on the sorted list?
Hello, Below is my what I have on my view page: <script> $("#myFav").sortable({ axis: 'y', stop: function (event, ui) { var Order = $(this).sortable('serialize').toString(); // save this Order value to the database } }); </scrip> <div> <ul id="myFav"> <li id='item_1'>Item 1</li> <li id='item_2'>Item 2</li> <li id='item_3'>Item 3</li> </ul> </div> So how do we use this "serialize" data which is comma
Validacion masiva usando Jquery y Ajax
Saludos comunidad espero esten bien... Tengo un problemita con validaciones masivas en Jquery... para que me puedan entedner les dejo el enlace donde tengo publiado el problema con detalle...espero me puedan ayudar: https://es.stackoverflow.com/questions/120038/validacion-masiva-de-un-datatable-usando-ajax-y-jquery
Passing variable to php for chatbox
Hello. I'm trying to pass a variable from jquery to PHP to write it to an HTML file that then gets read by PHP that contains the original jquery. (chatbox) I'm not quite sure where it's broken. I don't know jquery at all, I've just pulled someone else's code that they put out and modified it. This is the a.php which passes the variable to b.php <!--THIS IS WHERE THE CHAT STARTS--> <div id="wrapper"> <div id="menu"> <p class="welcome">Welcome, <b><?php echo $first_name; ?></b></p> <div style="clear:both"></div>
uncaught type error assistance
Hi, I'm working on embedding a widget and i'm getting this error: Uncaught TypeError: jQuery(...).genivitycalc is not a function at HTMLAnchorElement.onclick. This is what it's referencing: <a id=”gc-genivity-button” class=”gc-ret-health-gray” onclick=”$(‘body’).genivitycalc(‘init’)”></a> I tried replacing the $('body') with jQuery('body') but that did not work. This is what i'm working with: <!– Ignore this if already included JQuery in your site –> <script src=”https://www.genivity.com/wp-content/uploads/2017/02/jquery-1.9.1.min_.js”></script>
Bootstrap modal pop not working with http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js
Hi, I am trying to make use of a Collapsible Nested GridView with Paging using ASP.Net and the problem is that I am already using a bootstrap modal pop-up which allows postback. My problem is that the modal pop-up closes automatically after postback when I include the http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js script.
Working with multi-dimension arrays - help please.
Hi, if I have a object that includes a multi dimensional array: sport = new Object(); sport.game = new Array(1); sport.game[0] = new Array(2); sport.game[0][1] = 12; sport.game[0][2] = 24; sport.game[1] = new Array(2); sport.game[1][1] = 3; sport.game[1][2] = 7; a1 = sport.game[0][2]; // Is there a way to get the value [0] highlighted in yellow, a1 = sport.game[1][2]; // Or in the second case the value [1] highlighted in yellow? Thanks in advance.
Why my combobox only work in first row
Why my combo only work in first row but in second row doesn't work ? Myscript : $("#btnAddRow").on('click', function() { var table = document.getElementById("myTable"); var lastRow = table.rows.length; var row = table.insertRow(lastRow); col1 = row.insertCell(0); col2 = row.insertCell(1); col3 = row.insertCell(2); col4 = row.insertCell(3); col5 = row.insertCell(4); col6 = row.insertCell(5); col7 = row.insertCell(6); col8 = row.insertCell(7); col1.innerHTML = "<select name='fselect' id='buah' style='width:55px'><select><?php
Select value in Json with variable
Hello, I have two variables: var idtags = 82; var default_value = '[{"82":"2"}]'; How can I do to select the value in the json, according to the idtags variable? Best regards
jquery 3.2.1 version animate() - callback function executing before animation completed
Hi All, We have upgraded jquery version 3.2.1, animation()- callback function executing before animation is completed after execute next line. $(".btn2").click(function(){ $("p").slideDown(1, function(){ console.log("inside") }); console.log("outside") }); JQuery 3.2.1 output 1.inside 2.outside. JQuery 3.1.1 output 1.outside 2.inside. Sample Link(jquery 3.2.1): https://www.w3schools.com/code/tryit.asp?filename=FLMCAWA173W6 Sample Link(jquery
About jQuery Code inside learning and V8
Hi: I try to learn more jQuery Code inside in these days, and recently find some issues about V8. Some How, some people suggest reading V8 can help more understanding about javascript, but it indeed a huge work. I didn't see a book really analyze it in deep. And furthermore, I can't make sure it really can help me to know jQuery better. For me, jQuery Code is still many unknown and powerful, like some issues about promises using. So my problem is, is reading V8 really help to understand more about
How to select submit form with ajax, after using jQuery add elements method .after ()
Page .php on wordpress <script> $(document).on("click", "#solicitarServico", function() { $(".simulador_de_precos_box").after(" <form accept-charset=\"UTF-8\" name=\"contact-form\" id=\"contact-form\" method=\"post\"> <input type=\"text\" name=\"name\" required>"); <button type=\"submit\" name=\"submit\" id=\"submit\">Send</button> </form>"); }); </script> <script> $( "form" ).on( "submit", function( event ) { event.preventDefault(); var data = {
Is there a way to have not only position of object remembered, but if it has been rotated?
Is there a way to make it remember rotation as well as location? <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title></title> <style> #draggable, #draggable2 {cursor:move; } #containment-wrapper { width: 1500px; height: 2000px; border: 2px solid #ccc;} .zoomTarget { width: 1000px; height: 500px; border: 2px solid #ccc; } .object { float: right; -webkit-transition-duration: .3s; -moz-transition-duration: .3s; -o-transition-duration: .3s; transition-duration:
Help is autocomplete and linking values
Hey guys I'm using autocomplete to return a set of zipcodes on a saerch. I need the values to be linked to a page for pricing based on the zipcode the input. Code is below: <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>jQuery UI Autocomplete - Default functionality</title> <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"> <link rel="stylesheet" href="/resources/demos/style.css">
BubbleSort values greater than zero leaving any zeros at the end of array;
Hi, if I have the following Array: tide = new Array(8,4,3,9,0,0,12,0); Currently if I do a bubbleSort I end up with this: 0,0,0,3,4,8,9,12; I do no know how to bubbleSort the Array to remove the zeros at the start and end up with them at the back of the array: 3,4,8,9,12,0,0,0; Any help would be good thanks in advance.
Keypad disappear issue in chrome browser for mobile device
Hi JQuery support team, We are using jquery-1.11.1 version. We have keypad disappear issue in chrome browser for mobile devices. If we open bootstrap popup in mobile chrome browser and try to enter text in any field then keypad disappear instantly. This issue comes only when we have any password saved in browser for our website. If we clear all passwords from chrome browser then its working fine. We have multiple bootstrap popups in our page with multiple password fields. If we change all those
Change a dropdownlist select option to input checkboxlist
I have a dropdownlist using select and it works fine. Now I need to convert it to checkboxlist. For some reasons, I can not clear the input checkboxlist before appending new ones. Below is my code. Any help will be appreciated Code as select ------------------- <tr id="select"> <td> <span id=Drop>Administration</span> <br> <select name=ddl id=ddl disabled style="HEIGHT: 25px; WIDTH: 95%"> <option value="" selected>--Select Administration
Need to post a hidden form field with jQuery
I need to fetch a csrf value from a php and post it via a hidden form field using jQuery. My code is here: https://stackoverflow.com/questions/47196897/how-to-have-jquery-to-return-csrf/ What wrong I did there? Any advise is appreciated.
Jquery to add dymic menu
Hello I am new to jquery, I would like to develop a pizza site, which should have left menu as products, center menu as sub products . I will have menu configured from JSON URL which keeps updating from it source. [ ideally lotus notes ] which is left side of the page. and sub menu should be automatically updated from selected products in main menu.. Can anyone please help me how this should be done. Thanks
Detecting height of div and dynamically resize
i have two 50/50 boxes. Left box has textual content inside and the right side of the box has a map inside. When i resize the browser down the height is matched perfectly using a bit of jquery. But when i resize the browser back up to a bigger size, jquery doesn't update the css height. The code i manage to put together based on what i have read on the net is as follows. An example is here http://217.199.187.191/scalegillfoot.com/ look very bottom where map and surrounding area is. Resizing the browser
Submit form without refresh
I was googling how to submit contact form without refreshing. I found some plugin. As about success message I guess this is impossible for ajax to know if the message is actually emailed on php part? Right? Or how the code should be to know if this is actually emailed without error?
Why eq(0) returns an array AND no attributes property?
I'm using this function to get the first jquery object: function getfirst(selector) { var selected = $(selector).eq(0); return selected; } This works for me almost everywhere. It returns an jquery object which has "attributes" property.(And so many other properties). The attributes can be enumerated When I want to get an object of table using an 'id' like this: getfirst('#tableMain'); It returns an object has property "0" "length" and "prevObject". It doen't have "attributes" object. property
[jQuery 3.2.1, Internet Explorer, Edge] $.isPlainObject fails when passed object has been created in child (popup) browser window
We have two JS controls - viewer (displays images) and thumbnailer (displays thumbnails). By default they both are located in main browser window but there is a possibility to "undock" viewer from main window and have it in separate popup browser window. We have no issues when using jQuery 2.1.4. But after upgrade to jQuery 3.2.1 we get the following error: Here $.isPlainObject function is being called as a part of $.extend function call. Object that is being passed to $.isPlainObject has been created
use on click do not work after ajax call
Hello, I've using jquery 1.8.2 and here is the following code I have: $(document).ready(function () { var user = 1; $("a.like").on("click", function () { var article = $(this).attr('data-article'); $.ajax({ type: "POST", url: "WebService.asmx/Like", data: "{ 'user': '" + user + "', 'article': '" + article + "' }", contentType: "application/json; charset=utf-8", dataType: "json",
How to extract part of the resultXML of $.ajax() call?
$.ajax({ type: "POST", url: "some_url", dataType: "xml", success: function(result){ // code... } }); The code above returns me the following XML: <ALL> <FIRST> <content>of the first xml...</content> </FIRST> <SECOND> <some>other xml...</some> </SECOND> <THIRD> <content>of a DHTMLX grid</content> </THIRD> </ALL> I would like to assign the third XML to a DHTMLX grid but I'm not able to extract it from the output
Error: Permission denied to access property "apply"
i am using ASP.NET C# development trigger http://localhost:33245/Scripts/jquery.min.js:14:5486 trigger/< http://localhost:33245/Scripts/jquery.min.js:14:6103 each http://localhost:33245/Scripts/jquery.min.js:3:3129 each http://localhost:33245/Scripts/jquery.min.js:3:700 trigger http://localhost:33245/Scripts/jquery.min.js:14:6079 n.fn[b] http://localhost:33245/Scripts/jquery.min.js:14:6565 <anonymous> http://localhost:33245/:943:21 dispatch http://localhost:33245/Scripts/jquery.min.js:9:8978
javascript: history.go(-1);location.reload(true);
The below Java script work fine for IE but not in Chrome javascript: history.go(-1); location.reload(true); Is there a script available in jquery for chrome? it looks simple but it is not. Please help me
servlet called
I would appreciate someone's expertise to solve my dilemma. I have a website which uses AJAX, jQuery and MySql DB. The code populates a table upon Document.ready call (MVC used: jsp calls Servlet with ($.get controller_1() ) and servlet calls class file (queries DB), then servlet response back to main jsp page. This code dynamically creates a button/( ie to look like a hyperlink). When the button is clicked jQuery used $.get controller_2 ( a different servlet). Unfortunately, the click function sends
Finding out the opacity of an image?
Hi, if I have four images in set up like this: <div id="holder"> <img src="assets/1.png" style="opacity:1"; <img src="assets/2.png" style="opacity:1"; <img src="assets/3.png" style="opacity:0.3"; <img src="assets/4.png" style="opacity:1"; </div> Is it possible to filter and return the number of images that has not got its opacity set to 1? Thanks in advance.
About Ajax and echo/json/ problem
Hi: I meet a problem about the usage of Ajax when seeing the example about treetable, the code example is in http://jsfiddle.net/djlerman/bbj8k9pe/, and the main problem is about Ajax and url: '/echo/json/', the code snippet is as following: function getNodeViaAjax(parentNodeID) { $("#loadingImage").show(); debugger; // ajax should be modified to only get childNode data from selected nodeID // was created this way to work in jsFiddle $.ajax({ type: 'POST', url:
Using ajaxSend to capture requests from parent page within an iframe
I have a web page that exists on my webserver (that I cannot modify) that sends ajax requests. Within that page is an iFrame which contains a page that I CAN change that exists within the same domain. From within that iFrame, I am trying to use ajaxSend to capture what the parent page is sending but it does not seem to be working. Is this possible to do from the iframe? Here is the javascript that exists in the page within the iframe. <script src="Scripts/jquery-1.4.1.min.js"></script> <script type="text/javascript">
Jquery Memory Leak
We are using jquery 3.1.1 to develop ASP.NET mvc application after 10 mins of continous usage on IE11 we are encountring "Out of memory" issue because of various memory leaks in jquery3.1.1.js at various places. Our application heavy using jquery callback functions. Any one have any idea to fix these leaks?
How to append both single and double quotes in same function
Hi, I am trying to append the single quote and double quote in the same function, but I am unsuccessful. Please help me in doing this. HTML: <input type="button" value="click" id="clickc" onclick="helloMan()"/> <div id="mainDiv"></div> JAVASCRIPT: function helloMan(){ var dialogue = "I'am Suren and I asked him a question, for which he replied, "I don't know !""; getName(dialogue); } function getName(name){ $("#mainDiv").append("<div>"+name+"</div>"); } Thanks in advance, Surendar
How to increase the performance of assigning height (DOM manipulation)?
I have a case which I need to manipulate the height property on the fly. For that matter, I got a solution by using this code: $('table tbody tr td:first-child').each(function(){ var height = $(this).height(); $(this).parent().find('td').height(height); });It works fine and the calculation is precisely correct. However, for the performance, it's pretty slow because in the real situation, the table can have up to 100 rows. Therefore, I tried to ameliorate it by using native js and some other
jQuery datatables
Hola qué tal comunidad busco sabiduría de su parte con esta duda que tengo... Tengo un datatable dinámico con dos campos <Tr> <Th>Nombre</Th> </Tr> <Tbody> <Tr> <Td class="edición">Juan</td> </Tr> Bien así voy llenando mi datatable de manera dinámica...mi datatable tiene más columnas okey y en este caso la clase sigue siendo edición.. Ahora fijence yo quiero que cuando haga clic en cualquier fila del datatable automáticamente aparezca un input de tipo texto, pueda escribir sobre el input y al precionar
put slide show in sequence
Good morning people! I have a difficult question to solve. Actually, I do not even want a solution, but I teach: So imagine an ul with, say, 5 li's. These li's are inline-block. I'll apply a slideShow effect on them so they run from right to left. So far without mysteries: It works well. My question is this: For each li that runs, a smooth running effect is applied from -0% to -100% in its (normal) position. This, of course, added 100 to 100 to each passing li. No surprise. The doubt: When the li's
File upload >4GB failing on IE using ajaxForm
Hi, I am trying to upload the file >4GB by submitting the formdata using .ajaxForm but getting an arithmetic exception as "Arithmetic result exceeded 32 bits" in jquery.form.js on IE, no issues on chrome.
Next Page