Javascirpt - remove rows dynamically after 2mins
i am calling a webapi using get method which will give json data and i am display as a table from that data. the code which i have given below is working fine. i got around 25 rows(dynamically" of data when i fit the service. this webpage will be refreshed using signalR. when any changes in DB immediately it should reflect in the webpage. my question is if "" + item.TakeupType + "" value is "Completed" or "cancelled" this row background should change to gray color and after 2mins row should be remove
Set Value Select Option data-
Hi Friends how to set value, searching by data-idperson here my fiddle: https://jsfiddle.net/jamiguel77/v7hz7a0w/ Any Advice? Thanks
Getting a button to target a particular set of items
Hello. I'm (trying) to build a simple flashcard page. The HTML is currently hardcoded with unique IDs. Using the following jquery with for loops I can successfully flip the individual cards, but the code I've written for the 'Toggle all items per section' button targets all the sections no matter which button I click. I've been struggling with this for a stupid amount of time and wonder if any one could point out my error. JS (function($) { // Toggle all items per section (THIS DOESN'T WORK) for
ajax json response from PHP not recognized
PHP server: $result = array(); //declare empty array $result['error']=''; $result['result']=1; $result['crud']='E'; echo json_encode($result); =================================== AJAX $.ajax( { url : "xxxx.php", method: "POST", data : value, dataType : "JSON", success: function(response, status, xhr) { var crudType = response.crud; var dataResult = response.result; if((crudType == 'E') && (dataResult
Clone page but vertical scrollbar appears momentarily on transition.
Hi, I have added a updated fiddle as although I can clone a page after the initial clone subsequent calls to clone the original page displays a vertical scroll bar on transition. https://jsfiddle.net/j8w5qwta/216/ Can anyone help? Thanks.
Autocomplete: Filters again after remote data call?
It looks like the remote data option for autocomplete is re-filtering the results? How it breaks: I want a search for "John Smith" and a search for "John Jr." to both return from the server "John Smith, Jr." - and I'm handling that logic server-side. The first search will work, but the second search gets back the result from the server, then filters it out because it couldn't match the string "John Jr." against the results from the server. It seems like in the server call case, it shouldn't re-run
Using jquery to filter list
I've got a series of divs generated by a wp_query loop, each loop pulls through an individual post contained in a custom post type. Each div contains a few bits of information - yep this is on wordpress haha. So we have a page where all of these posts are listed and at the top of the page I have a few dropdown inputs. I'm trying to use jquery to update the list of divs to only display the ones that contain the information chosen in the dropdowns - ideally running each time the user changes an input.
Customize jQM close button on multiple selectmenu dialog
I am trying to change the close button on a jqm dialog to something other than X. The reason that I want to modify the icon is that the close button leaves the user confused as to whether his selection will be cleared or not (since it is a multiple select). I need to change it to a Done button. The selectmenu has data-native-menu = "false" and my jqm version is 1.4.2. I have tried changing the buttonMarkup on pagebeforeshow and on pageinit without success.
tabs("refresh") not working with custom tabs download
I have the tabs widget applied to a website and everything works well, except that I am using the full jquery-ui download quite unnecessarily. Attempting to improve download speed for my website I made a custom download for the tabs widget only. It works fine for the initial load of the tabs, but when fetching new data with Ajax and applying the refresh method it just does not work. It throws no errors. The code is very straight forward: 1 - on page load - which works fine with the specific jquery-ui
Chess like Gui
I have to build some GUI that is quit similar to a Chess game. The visitor drags and drops elements from the sidebar to some other place on the screen. Is there any Query plugin or a library available for that? Or some other way? Thx
Trigger the right event when a form opens on a page
My problem is that I don't know what is the right event when a form opens on a page.Specifically, my webpage is as follows: http://pcgraph.triplebit.com/product/on1-jersey-unif/ When the visitor clicks the upper button (with the envelop icon) it launches a form. I need to set a specific value to one of the fields with jQuery at that moment. Is it possible and how? Thx
Cannot add two "Range Date Pickers"
Hi, I am new to development and don't have too much experience. I want to add multiple sets of "Range Data Pickers" on a single web page. I have used the source code from here: http://jqueryui.com/datepicker/#date-range . In my body I have two divs within a CSS Grid. Within them i have to google charts and underneath them the two date pickers. I have them both showing up in their respective places. The first date picker works, when the text field is clicked it prompts for a date to be picked, the
Adding pauses to a function
Hi: the following function shows the text associated with each of two instances of a class--hover on either instance of 'myclass' and you'll get the text associated with it, and the text associated with its neighbour: Code: function showBoth() {
$('.myclass').hover(function(){
$(this).find('.mytext').visibility('visible');
});
$('.pair1').hover(function(){
$(this).next().find('.mytext').visibility('visible');
});
$('.pair2').hover(function(){
$(this).prev().find('.mytext').visibility('visible');
});
}Both
Receiving Internal Server Error on Ajax calls intermittently
I have a MVC .NET 4.5 web application running on 4 servers under IIS. Whenever I login into my web app and select a tab option, a GET request is fired. I am receiving below error when this request is triggered. xhr.send( ( options.hascontent && options.data ) null ) 500 internal server error If I keep refreshing the page, this data is getting returned intermittently. i.e. once it works and the other time it fails. Also, this happens only when I use a load balanced VIP URL. It works fine using a
event not firing help
im trying ti generate table dynamically from database using ajax jquery (Table is lits of students ). i got the result fine. when i view source page the tbody of table is empty ??? . i want to handle event and anchor click to list student detail but onclick fire fine i got the field empty . why ??????????????????????????????? // Fill table with data function addRows() { var rowsResult = '' ; //alert('ssss') ; $.getJSON('/users/studentlist', function (data, textStatus, jqXHR){ var x =0 ; $.each(data
when redirecting to a new page using $.mobile.changePage(url), the url has added new url after original url with '#'
Recently, when i was checking my webapp pages on Chrome, I found one big issue: when i was redirecting from page B to page A, the url of page B has kept in the url ! ! And it was put before page A. eg: page A : https:mydomain/home.html page B : https:mydomain/Optimization/List when i redirected from page B, the url of page A has changed to https:mydomain/Optimization/List#/home.html After many tests, i found that when anchors using relative address would cause the issue. And this issue was found
Contact Form 7 validation issues on select2
Having the following code, got from the developer but she is unable to fix the select2 issue because she does not knows it. <script type="text/javascript"> jQuery(document).on('blur', 'input.wpcf7-validates-as-required,.select2-container .select2-selection--single', function(event){ empty = jQuery(this).val(); alert(empty); if(empty == '') { jQuery(this).addClass('wpcf7-not-valid'); } else { jQuery(this).removeClass('wpcf7-not-valid'); } }); </script> How can i add a select2 check in this check,
Processing arrays/objects pulled from XML?
Sorry if this is long-winded. I'll stick a tldr at the end. I don't have any development experience, but at my job I occasionally need to use jQuery to manipulate HMTL pages. I've skated by piecing together bits and pieces from the jQuery documentation/various blogs/StackOverflow. Lately I've been trying to actually understand what is happening rather than just blindly copying and pasting until something works -- which is what this question relates to. Here is my current project: Audience Like
Datepicker responsive
Hello everybody, i have a problem with jQuery Datepicker. I am using it in a Contact Form 7 Wordpress plugin. When i open it on responsive, it looks like this: However, when i scroll down, or select some date, it breaks and looks like this: This seems like a bug or a conflict with some other JS file, but i don't have an idea what could exactly be the problem here. Did somebody have a similar problem earlier or does somebody have an idea what could be the problem? Again, this problem occurs only on
How can I filter a listgroup of span?
I need to filter a listgroup like this: <div class="list-group pre-scrollable list"> <?php for($i = 0; $i < count($places); $i++) { ?> <span class="list-group-item listPlaces" value = '<?php echo $places[$i]->id_company ?>'> <div class="row"> <div class="col-sm-8 col-md-9"><?php echo '('.$places[$i]->id.') '.$places[$i]->name; ?></div>
contextMenu not working on dynamically created html tags
after creating dynamic div with class name sourceText contextMenu does not appear. while working with already existing div with class name sourceText. $(".sourceText").contextMenu({ menuSelector: "#contextMenu", menuSelected: function (invokedOn, selectedMenu) { } });
Unable to set href
I am unable to set the href of an <a> control using javascript or jQuery in my asp.net application. I recently installed jQuery version 3.2.1 and have been attempting to dynamically set values of the controls within an aspx modal popup control. All seem to be working except the one to change the href of an <a> control. Here is my function: function PopAddWebLink(thisNode){ clearPanel('cphMain_pnlAddWeblink_Pop'); // Copy data into Popup var thisTaskID
Unable to drop the value to the jquery builder input value.
i am using jquery builder in my ember app. i m using jquery drag and drop function to drop the value to the input field . my drag nd drop functionality is working fine but once the value is dropped to the input field of the query builder and then upon saving i m getting this error "Cannot read property 'condition' of null". This eventually means that particular input field is not accepting the drpped value. how to fix this issue?? how to call the drop method from the jqery builder?? $('#buildQuery').on('dragleave',
Apply second filter on first selected elements?
The standard selection in jquery is $(".foobar").......... Now assume this expression matches multiple elements and I additionally want to filter out some of them. How can I apply a second filter on the results of the first selection? Example: <div class="foobar bbb">....</div> <div class="foobar">....</div> <div class="foobar"><p>sometext</p></div> 1.) filter out (=ignore) all those elements which contain an additional class bbb AND+NOT boolean link 2.) select from the result set only those elements
should we pass event parameter all the time
hi, In following example event parameter is passed in the function . q1) is it optional can we do with out it ,? or it is good paractice to keep it there where it is. $( document ).ready(function() { $( "a" ).click(function( event ) { alert( "Thanks for visiting!" ); }); }); yours sincerely
which jquery files listed below should be changed to being the current version?
I currently have the following references to jquery in a web form 2010 application where I updated the main jquery reference: <script src="../scripts/jquery-3.2.1.js" type="text/javascript"></script> <script src="../scripts/jquery-ui-1.7.2.custom.min.js" type="text/javascript"></script> <%If (False) Then%> <script src="../scripts/jquery-3.2.1.js" type="text/javascript"></script> <% End If%> <script src="../scripts/site.js" type="text/javascript"></script> <script
Delete all (brother) elements AFTER a certain element?
Assume I specify a certain element (e.g. with class="foobar"). This element and all following brother elements should be deleted but NOT the brother elements BEFORE Example <div class="...."> <div class="aaa">...</div> ... <div class="foobar"> .... </div> <div class="bbb> ... </div> .... <div class="bbb> ... </div> </div> <div class="parentbrother>...</div> How can I achieve this (keep in mind that no brother elements could follow)? The following (Javascript) code deletes ALL elements
Most current version of json
In a vb.net 2010 web form application, I am in the process of obtaining all the most current jquery references that includes the jquery version 3.2.1. As part of this process, I want to see if I am using the most current json references for json2.js. When I click on the links that are listed below, I get the 404 server error where the link can not be located. /* http://www.JSON.org/json2.js 2009-09-29 Public Domain. NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. See http://www.JSON.org/js.html
use jquery migrate plugins
I have a vb.net 2010 webform application that uses the original jquery libraries. I plan to upgrade to the 1.9 version and followed by the upgrade to the 3.0 version. I am thinking that I need to obtain the jquery core library to use as a reference to my scripts. Basically my reference to scripts are in the following order right now: <script src="../scripts/jquery-1.3.2.js" type="text/javascript"></script> <script src="../scripts/jquery-ui-1.7.2.custom.min.js" type="text/javascript"></script>
obtain current version of 3 jquery plugins
In a vb.net 2010 web form application, I am in the process of upgrading all jquery references to be the most current version which is the 3.2.1 jquery library. While I am in the 'core' libraries, I want to upgrade all the jquery plugins to the most current version. Due to that fact, I have the following jquery references in the application, that I would like to know if there is a more current version that I can use from the following jquery items listed below: jquery.validate.pack.js jquery.validate.js
window.load event not getting fired when I open a link in a new tab
I am opening a link in new tab using **Ctrl+click.** Simultaneously I am opening 6 to 7 tabs. On few pages I am getting it and on some its not working. **Browser - Chromium ,Version 53.0.2785.143 Built on Ubuntu , running on LinuxMint 17.3 (64-bit)** This is the my code. $(window).load(function () { alert('here'); }); What could be the possible issue ? Basically I want to fire an event when whole page is completely loaded.
[Solved] Issue with Draggable (jQuery UI)
Hey, I've been trying to use jQuery UI and especially the draggable function for hours. I kinda don't know how to use the containment. There is a left div in my HTML page which take 25% of the width of the page, and inlined to it an SVG with severals polygon. I'm trying to be able to move the whole SVG on the x axis from n (in the example n is set to 10) to the end of the SVG with as n a blank margin from the right border on the page like the one between the left div when the SVG is fully dragged
Issue with jQuery UI select menu: Uncaught Error: no such method 'instance' for menu widget instance
I have a drop down list(select list) with ID 'TestList'. I want to use this as selectmenu from jQuery UI. This drop down is getting dynamically populated so initially there are no options to this select list. In the scripts section, I am first initializing the select list with select menu as: $("#TestList").selectmenu(); Next, I want to dynamically populate it with data, so I am doing this: for (var i = 0; i < data.length; i++) { $('#TestList').val(data[i]);
Bradley Witham- diff. b/w find and children
Hi, I am Bradley Witham I am new to jquery. I want to know what is the difference between using find and children in jquery. Thanks, Bradley Witham
我有个问题
很久没有登陆jQuery的网站,之前一直使用jQuery2.1.4,今天看到网站上已经更新到3.0把版本,我不知道在这之前经历过多少改动,如果我现在使用最新的版本需要注意哪些问题?我需要帮助,谢谢。
how to using jQuery to meet a string deep copy
Hi: I have a problem about deep copy. Instead of using javascript slice(1), is there any other way to deep copy a string via jQuery, such as var str=deepcopy(old_string) Thanks a lot.
Disappearing <br/>
I'm setting up a dynamic form. As such I am placing many br tags in various places. My last part of the form is behaving strangely. I notices that some br s where missing. So I stepped through my code with the chrome debugger and I found the strangest thing happening. It places the line break no problem, and continues to place all the various elements after the break. But when it gets to the next line break, the previous line break disappears. (it get removed entirely as an element, and in the browser
refreshing certain div many times
Hi I need to reload part of page (div) everytime I click the link in this part (div). I write almost successfully code bellow - when I click first time it works - but could not refresh second time and so on (nothing happend) <!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script> $(document).ready(function(){ $("#abcd").click(function(){ $("#div1").load("this_file.html #div1"); }); }); </script> </head> <body>
another problem with list
Hi there, hope you got an amazing christmas gift. this is my problem: I have a year list, when I click on an element of list, I send the data by ajax to php, and refresh the page with new data. this is working perfetcly. On my list I start with a simbol near the current year. If I click on different year I would that the simbol apper only in the year that I clicked. I can't achive this. <ul class="dropdown-menu"> <li class="header">Esercizio Contabile</li>
Loading a html part with a script with .load() does not work
Hello, I am trying to use jquery.load to load a file with an embedded codepen, that is made resizable by a script called resizable.js. the resizing on a ingle page works fine (>resizable.html). As soon as I load that part of the page including the script, it doesn't work anymore. In the attached files you can find the resizable.html file showing the possibility to resize the codepen by clicking in the right bottom corner. Bit if I load the part of the page with the script in the file Load_resizable,html
Next Page