hi guys, i have a question about animate function
Tết Này một mực Phải mua Ngay Bộ Đồ Lót Nữ Đón Năm Mới Bạn thiếu tự tin giả dụ không tô son? đặc biệt, ở đây với những hàng ghế trắng xếp san sát nhau, trông rất bụi bặm và đậm chất phương Tây. Phun môi pha lê 3D là cách giải quyết tình trạng môi thâm, môi ko đều màu, môi quá dày hay quá mỏng, môi khô, đem lại cho bạn một vài môi căng mọng, đầy sức sống sở hữu màu môi trẻ trung, lóng lánh đầy quyến rũ như ánh pha lê trên bề mặt môi. Ở Trung Quốc, đề cập đến cặp đôi LGBT nổi bật, người ta sẽ thủ thỉ”
Parsing JSON table: hiding a row, changing color of word.
Hi all, I am using jquery to convert a google spreadsheet to JSON that produces a HTML table. I would like to: - hide one of the rows that has the phrase "E9" in it. - change the color of the phrase "C12" to red. I have tried many scripts, but to no avail! Here is the code I currently have. Thank you very much! <html> <head> <script src="https://code.jquery.com/jquery-3.1.0.js"></script> <script> //google spreadsheet var spData=null;function doData(a){spData=a.feed.entry}function
How to fix var when jsFiddle says var already defined
Here is my fiddle https://jsfiddle.net/juggernautsei/w8yn2ehk/ $(function() { $("input[name$='notify_type']").click(function() { var test = $(this).val(); var selected = $("input[type='radio'][id='notify_type3']:checked").val(); $("div.referral").hide(); $("#ref" + test).show(); if(selected == "4") var opts = [ {name: "Please Select", val:""}, {name:"WMOX", val:"WMOX"}, {name:"WVKL", val:"WVKL"},
Loading a file to cache only
I find the opposite question a lot, but I haven't found the answer to this one yet! :-) I'm trying to load a file in to the user's cache, but not actually use it on that page. The logic is, on the first page load I would use PHP's include() to load the CSS inline, then at the bottom of the page I would load the external CSS file to cache it and set a cookie to signify that it has been cached. Then on the second page load I would test for the cookie, and if present I could link to the CSS like normal.
jQuery application: trying to make the “wheel” event listener discontinuous fails
I am working on a small "Picture browser" application in Bootstrap 4 and JavaScript. As can be seen in THIS jsFiddle, there is a "Prev" and a "Next" button that help navigate through the pictures. I have bean trying to find a reliable method to make mouse well scrolling function the same as these buttons. Scrolling down would be the equivalent of clicking the "Next" button. Scrolling up would be the equivalent of clicking the "Prev" button. Firing the showSlide() function on mouse wheel does work,
Defining CSS based on whether user is at top or scrolled down
I'm having a sticky navigation issue that's causing anchor links to scroll too far or not far enough, depending upon whether the page has been scrolled down in the slightest. As soon as the user starts to scroll down, the header section is reduced in height with only the navigation remaining. Is there a way to define CSS for an anchor based on whether the click on the nav link occurred while scrolled to top or not scrolled to top? Here's what I have so far, but the .anchor changes to the non-top
on click and automatic image cyclers crossfade consistentcy
Hello guys! I'm new to this forum and jQuery and would like to ask for your help.:) I have this code for an automatic image cycler and I really like the smoothness of the crossfade, it also works independently with identical .wrappers containing children divs: $(".wrapper").on("click", function() { var $content = $(this).children(); if ($content.length > 1) { var $curr = $content.filter(":visible"); var $next = $curr.is($content.last()) ? $content.first() : $curr.next(); $next.fadeIn(2000) $curr.fadeOut(2000)
Reading from a separate config file
I wish to know what is the right way to use a 'configuration' file for my jQuery plugin. I'm using an editor that accepts configuration options. Right now I've a format that looks similar to - `editor.js` ``` let config = { opt1: 'someVal', opt2: 'someOtherVal' } $(".editor").awesomeEditor(config); ``` I was thinking I should maintain a separate config file instead where I define `config` options. But then, what is the right way to include this new config file so that my plugin
Add and Remove Data from one table to another
I am looking for a way that if I click on the Add button then the data is passed to the include-table. Here is the code: <div id="table-scroller"> <table class="table table-striped table-hover dataTable catalogueContractsTable admin-form theme-primary" cellspacing="0" width="100%" role="grid"> <thead id="tableHeader"> <tr> <th class="bg-white">Name</th> <th class="bg-white">Contract Type</th> <th class="hidden-xs bg-white">Start Date</th> <th class="hidden-xs bg-white">End Date</th> <th class="hidden-xs
jQuery OnBeforeUnLoad Not Working Properly
Usually when using Javascript onbeforeunload to detect page reload or page refresh events, if the refresh or reload is detected, a popup appears displaying a message and the options to either cancel or leave the page. The problems I'm having is number one, my custom message is not displayed but instead a default message is displayed in Chrome. And two, I would like to call a method when a user clicks the Leave Page option. I've read that this can be achieved using the unload function but it is
$.when() surprisingly differs from $.Deferred.promise()
What we have The jQuery documentation describes $.when() as a sort of the promise generator: If a single Deferred is passed to jQuery.when(), its Promise object (a subset of the Deferred methods) is returned by the method. The Deferred.promise() chains all three its event pairs: resolve() - done() reject() - fail() notify() - progress()At the same time, the $.when() returns a promise which chains the only two event pairs: resolve() - done() reject() - fail() Look to the following screenshots: Deferred.promise
How To Control Input Type Dropdown Select Options Menu With Jquery
I am creating a web site. In this web site , there is a form. I have added 3 dropdown menus in this form like below. Now I want to when someone selects the number 5 from Adults menu , I want to show number 5 in the infants menu. And also I want t keep Adults + Children = 9. Then if this Total is below than 9 , I want to show that extra number in the infants menu. I mean like this , Adults + Children = 9 Adults = 5 and infants = 5 But , Adults + Children = 8 Adults = 5 , Children = 3 , it means there
Not submitting state or province from other picklists
I have a form that displays a select box for state or province (HTML name="state") depending upon what country is selected. For example, when United States is selected from the 'Country' select box, all the US states appear in another select box called 'States'. When Canada is selected from the 'Country' select box, all Canadian provinces appear in another select box. This is also the case for several other countries. The issue is this, when submitting, say United States and Colorado, the submission
Swipe right to toggle class but only if not swiping over specific classes
On my site I toggle classes to show the mobile navigation. Next to the button I offer the possibility swipe right to open the navigation and swipe left to close it again, but i have trouble with my tables. For big/long tables I am using overflow: auto which makes those tables scroll able(right & left if the content doesnt fit). Now if I like to scroll them, the navigation gets open. I tried something like that: jQuery: $( 'body' ).on('swiperight', 'body:not(.outertable)', function(){ if($('.nav-toggle').hasClass('is-active'))
disable past dates in datetimepicker
I'm using datetimepicker with bootstrap 4 and I want to not be possible to select past dates so I have the minDate like: $( ".input-group.date" ).datetimepicker({ format: "dd MM yyyy - hh:ii", autoclose: true, todayBtn: true, minuteStep: 5, minDate: 0 }); But its not working, the user can select past dates. Do you know why? I have a fiddle with the code "https://jsfiddle.net/0y8k9ah5/1/", but don't know why the datetimepicker is not working in the fiddle.
How to open multiple Accordions in print view
I am currently trying to use this CSS to display accordion style column/headings as "open" when in print view. However it is not working and the headings are still closed in print view. Please let me know if you have additional questions. Here is another person's example of the goal Im trying to reach. The first picture is before: Before and second is end goal for print view: end goal Any advice or tips are welcome <div id="accordion">
<div class="card">
<div class="card-header" id="aheading">
how to capture jquery keyboard paste event (Ctrl+V)
how to capture jquery keyboard paste event (Ctrl+V) and how to get the pasted value
_doPostBack not firing in Firefox
Team, We have migrated our jQuery to 1.6.3 to 3.3.1 which has led to browser issues. 1) _doPostBack : The below code works fine and post backs to the event in Chrome, Edge, IE but not in Firefox. I'm not getting any error messages as well. However, when I remap jQuery to 1.6.3 post back is triggered. Not sure what the issue is. __doPostBack($('div.tree-view input.update-button').attr('name'), 'ItemChecked') Any helps would be helpful. Thanks, Prasenna
How to pass variable values from jquery function to css file
Hi All, I am using jquery-ajax function to call database on page load and display values on front age(html page). My database contains coordinates also where value should get displayed. How can i pass variable values from jquery function to css file. JQuery function code: function callme() { $.ajax({//create an ajax request to display.php type: "POST", url: "ReadDataBaseValue", dataType: "html", //expect html to be returned success: function (response)
Ajax redirect if return false
I have all the code done for the login and session done now I want on each page that requires the user to be logged in to check and if false redirect. class.php public function check_session() { session_start(); if (isset($_SESSION['user_id'])) { return true; } else { return false; } } session.php <?php /* Includes */ include 'database.php'; include 'class.php'; $session = new Session($pdo); if($session->check_session())
Migrating jQuery 1.6.3 to 3.3.1 and browser issues.
Folks, As part of our remediation activity for vulnerabilities reported during pen test, one of the issue reported for "Outdated software may contain known vulnerabilities." and suggested us to migrate the jQuery from 1.6.3 to 3.3.1 and we had migrated the jQuery using nuggets in our .NET environment. This has opened up few issues as below, Issue 1 : Prior migration with jQuery 1.6.3 – In a web page, a user can select only one checkbox, when the user selects another check-box, already checked-one
Call function on page load and onchange
I want this function to check the state of the checkbox on load as well as onchnage but it doesn't work, what am I doing wrong please?: $(function (SFToggle) { $('#short_format').change(function () { if ($('#short_format').is(':checked')) { $(".no-short-format").hide(); }else{ $('.no-short-format').show(); } }); });
How to make a line move above the hovered menu item?
I am trying to make the red line move above the hovered menu item, then disappear when no menu item is selected. I am very new to Jquery so really stuck on how to do this. Does anyone have any ideas? The code is at http://jsfiddle.net/xpvt214o/276727/
HTML <div class="topnav" id="myTopnav">
<a href="#home" id="homeLink" class="active">Home </a>
<div class="dropdown">
<button class="dropbtn">About
<i class="fa fa-caret-down"></i>
</button>
<div class="dropdown-content">
how to return data from function to jquery function
i have 2 ajax jquery method,which call two indepent different function and return different data,but on showing datain gridview in jquery they sometime showing same data, may be during return data i m doing something wrong. <script type="text/javascript"> function consultantchat() { $(function () { debugger; var r = document.getElementById("<%=txtmanagerid.ClientID%>").value; var s = document.getElementById("<%=txtconsultantid.ClientID%>").value;
change handler function issue
Hi All, We have text box control[actualTwo] has below functionality, we see issue in production even actualTwo has value, sometime deltaTwo been set to blank, This issue happen inconsistently only for few users, we don't have option to connect users, we are not able to reproduce the issue. how can we reproduce the issue. Browser : IE 11. My suspect,actualTwo control has change event handler twice if any reason 2nd function ignores execution, deltaTwo will have blank value, is this case can happen,
Detect multiple presses of the same key
I'm trying to detect how many times a key is pressed. I'm trying to set up an old phone type of keyboard, so if I press 2 once I get "A", if I press 2 twice I get "B" and if I press 2 a third time I get "C". This is what I have so far, but it's not working properly. The console shows no errors, but if I press 2 twice it alerts A twice instead of B, if i press 2 three times it alerts A three times instead of C. var abcKey = 0; $(document).on('keyup', function( e ){ if(e.which==50){ // Keyboard
Displaying content when checkbox is checked
What is the best way to display additional content when only the first of a series of checkboxes is checked. For example, the form below includes four checkboxes. When the first is checked, a question with a textarea field needs to appear. <div class="checkbox"> <label><input name="answer" id="answer1" type="checkbox" value="Answer 1">Answer 1</label> </div> <div id="whyContainer" class="form-group hidden"> <div> <label class="control-label" for="expertise">Why?</label> </div>
Performance problems
Hi, I'm quite a newbie in jQuery and i've made my first real script to show results of a mysql query (with php) in a <div> below the search form. It works quite well but when I have more than 50 results, browser bugs and stops and when I make 2 links or more, it refreshs the page but don't execute the script. My script isn't probably very clean and I look for someone to help me optimize it. Thanks in advance.
Passing result from Google distancematrix to each element in table
Hello, I currently have a task that requires me to retrieve the distance between two selected drop-down locations and run them through Google's distancematrix API which returns a "distance". I am then supposed to pass that distance value to a field in the table, but the caveat is that the table is dynamic and needs to allow for added rows if necessary. My current setup, I can pass the result to the t_mileage field, but the on change event passes the final value to all totals and not each. Here is
How to insert hyperlink via jQuery
How can I define a hyperlink as a variable and insert it into the a href using jQuery? The reason for this is that our lead management system is automatically appending all hyperlinks causing some of those with specific URL parameters to break. Here is what I have so far, which I know is a mess: <script> function linkHigh) { var str = "high temps"; var finalLink= str.link("https://www.weather.com?bref=abcdefg#hightemps"); document.getElementById("highTemps").innerHTML = finalLink; } </script>
a quick question about preventdefault
I am a whore
Video slider: stop when the video is switched
Hi everyone, I have created a video slider embedding Youtube videos (using tag <iframe>), that is, I have two videos that switch between one and the other when I click on a circle that I have taken from fontawesome.com. When I clic on the bottom PLAY to start the video, it does not stop when I switch to the next video of the slider. I would like when I change the video, the previous one is stopped. I show below the js code that I have written so far. If you can help me to know what I should include
Document Ready & Change Combined
I want to show/hide areas based on the state of a checkbox and the value of a radio group, this works but looks long-winded & can someone tell me a more elegant way to do this please so its fired on page load and checkbox state change: $(document).ready(function() { if ( ($('#val_0').not(':checked').length) && ($("input[name='val_1']:checked").val() == 'custom') ) { $(".custom-row").show() }else{ $(".custom-row").hide(); });
JQgrid
jquery.jqGrid.min.js:426 Uncaught TypeError: Cannot read property 'msie' of undefined at jquery.jqGrid.min.js:426 at jquery.jqGrid.min.js:428 i am having this issue when i used jqgrid in asp dot net mvc 5 to use jqtreegrid. my referance js is @*<script src="~/Scripts/jquery-1.10.2.min.js"></script>*@ <script src="~/Scripts/jquery-3.2.1.min.js"></script> <script src="~/Scripts/jquery.jqGrid.min.js"></script> <script src="~/Scripts/i18n/grid.locale-es.js"></script> <link href="~/Scripts/jquery-ui.css"
JQgrid
TypeError: Cannot read property '0' of undefined when try to bind data in jqgrid in mvc 5 public ActionResult GetValues() { int page = 2; string file = Server.MapPath("~/App_Data/Data.json"); //deserialize JSON from file string objJson = System.IO.File.ReadAllText(file); JavaScriptSerializer ser = new JavaScriptSerializer(); var personlist = ser.Deserialize<List<Person>>(objJson); var jsonData = new
Stupidest question of the day
Okay, so I've use JQuery before and it's super easy. For some reason I'm having a mentally challenged moment here. Help! I've got the simplest (for test purposes) function imaginable: $( document ).ready(function() { $.ajax({ 'url' : 'http://www.laisps.org/getmeta.php?key=732', 'type' : 'GET', 'success' : function(data) { alert('Data: '+data); }, 'error' : function(request,error) { alert("Request: "+JSON.stringify(request));
Return ajax without using async: false
Hello, I'm trying to create a function that returns the result of an ajax request, but the ajax is asynchronous. Someone could tell me how to do it. example: function ajax(){ $.ajax({ url: link, data: data, dataType: 'json', success: function (result) { return result; } } }); } var result = ajax();
how to disable or hide the jquery balloon based on condition
See the below example. http://jsfiddle.net/zf51hb46/1/ What I am doing is enter some numbers in any of the textbox it will become *. Mouseover to the textbox it will show the balloon with numbers you entered. select all the *s and press the backspace it will remove all the *'s. Mouse over to the textbox again it will show popup that textbox has previous.It suppose not to show the balloon. I did the code with condition but it still showing. Is there anyway we can hide the balloon based on condition?
What happened to "jquery-latest.min.js" on code.jquery.com?
A couple years ago, I was advised to use the above link to ensure I got the latest version of jquery, and have coded this into my website. Today, while I was editing my site, I noticed that the link no longer worked, as my sub-paging (using "tabs") failed. I was able to get things working again by changing the src file to "jquery-3.3.1.min.js". Is this a temporary problem, or the way of the world in 2018 and beyond?
About the usage of +function ($) {...}(jQuery);
Hi: I recently read the codes in bootstrap, and see the codes snippet as following: +function ($) {...}(jQuery); the main problem is I didn't see +function before, and also can not find out any explain about this usage, what is that means, and when to use it. Is there any material about that? Thanks a lot.
Next Page