jquery ajax in php to stop refresh the page
When i clicked on book link he reload the page and sort the column . i want stop the reload using ajax ,,, How ? this jquery function <script> $(document).ready(function() { $( "#sorter" ).click(function() { var order_by_value = $('input[name="order_by"]').val(); if(order_by_value == "ASC"){ $('input[name="order_by"]').val("DESC"); } else { $('input[name="order_by"]').val("ASC"); } $('input[name="current"]').trigger('click'); }); }); </script>
JQuery Dialog showing a small icon
Hi All, I am invoking dialog box by clicking on an image. Once dialog box gets opened, even after closing it, one small icon appearing at bottom. When i click on it, again dialog box is coming. I want to remove this small icon, how can this be achieved.. Kindly suggest Thanks, Anuj
Do you know how to properly reduce this code?
I have this code to submit the form with name="search" on the change events of any of this select menus: categories, price, and range). The code is working but it doesn't seem very correct because it has some repetition. Do you know how to properly reduce the code? $(document).ready(function() { $('select[name="categories"]').on('change', function() { $('form[name="search"]').submit(); }); $('select[name="price"]').on('change', function() { $('form[name="search"]').submit(); });
Putt selected dropdown item on another text box
I have a Dropdownlist and I want when a user select an item from that dropdown, the selected item is put into a textbox with "new Item" append to it. Any idea using Jquery?
Programmatically cannot enable Tinymce editor after page load
Hi there, In my .net MVC app, I have I'm using an editor template where I have initialized the Tinymce editor like this (function(){
tinymce.init({
selector: 'textarea',
theme: 'modern',
mobile: { theme: 'mobile' },
menubar: 'edit insert format table tools help',
plugins: 'print preview fullpage paste searchreplace autolink directionality visualblocks visualchars fullscreen link table charmap hr toc advlist lists textcolor
JQuery loop display array name and value
I am trying to build a loop where it will display like this: Company Name ABC Inc Mailing Address Springfield ZZ 12345 Phone 1 (555) 555-5555 Fax 1 (555) 555-5556 My current code is not looping for each object just displaying once. Json Encode output [{"Company Name":"ABC Inc","Mailing Address":"Springfield ZZ 12345","Phone":"1 (555) 555-5555","Fax":"1 (555) 555-5556","Email Address":"test@test.com"}] HTML Code <!-- Company Details --> <div id="company"> </div> <!-- /JS Company Details --> <script
Disable a lit item based on a condition.
I am looking for a way that I can disable two list items, based on the class that is in the table, currently, I have two icons showing based on a number value. Is there a way that I can disable the Edit and Recordings list item. @if (t.IsLocked == 1) { <span class="glyphicon glyphicon-lock"></span> } else { <span class="glyphicons glyphicons-unlock"></span> } <td class="updateTableRow text-center"> <div class="dropdownContainer btn-group text-right"> <button id="@actionWorkId" type="button" class="btn
Jquery not working on Firefox and IE
I have a HTML page with jquery. But it does not output in Firefox and IE. It shows result in chrome. I am not find that where is mistake.. <script type="text/javascript" src="D:\Sanjeev_data\My other Folder and Files\HTML Work\Jquery\Effects-03-04-18\script\jquery-1.11.3.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("#before").click(function(){ $("p").before(function(n){ return "<div> This p elemenet has index "+n+"</div>"; }); }); }); body> <div> <p>This is first
Jquery dropdown multiple filter
Hello looking for some help with jquery multiple filter. I have done some filter, where I can show data from select option, and hide which value not selected. But its not working properly, when I do select for 3 different options, It shows me also incorrect data. Example I have selected Non active user, and when I select user position Programmer its shows me all programmerms even they are not active, here is my script, maybe someone can help to update it? function filterText() { var rex
Using .load to get data from my PHP code
Hi Everyone, I don't know if the .load is the correct function to use, please correct me if I am wrong. I don't know if the .load function triggers the PHP code to run by itself or if I need to use .load in conjunction with another function to do this? Possibly .ajax with POST??? not sure. Anyways, if I use the .load function in this way: $("#data1").load("read.php $db_data1"); will this fetch the variable $db_data1 inside read.php and place it in data1 HTML input field? The above is returning an
init:init
Hi, Looking at this codepen example: Exposing a private variable inside another function could some one please explain why init(); is not working? Thanks
How to use animate() to change color of text vertically?
How can i use jquerys animate()-function to change the color of a text vertically? I have a text called "EXAMPLE" which is in color black. Now i want to animate this text in the way to change the color of the EXAMPLE text vertically from bottom to top to 50%, so that the the color of the text is to 50% percent in red and 50% in black. It should be like a progressbar which animates from left ro right, but in my case it should go from bottom to top and not change the background-color, but the text-color
Passing Values From one page to another for Updating User Details
Hello, I have a UI where there is datatables and all the user details are in data tables coming through API Integration using Native Ajax with Edit and Delete option. I have Add user form and i want that on clicking Edit icon In UI all the details of particular user pass in my ADD user form to update user Details .I have API for Edit user details by his ID using PUT method I am able to pass the Id in the ADD User Form URL but not able to pass values Can Anyone provide some help Here is the code:
Modal is not appearing on option selection
I have this modal: <div class="modal fade" id="details" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true"> test </div> That I want to show when the option "shows details is selected" <select id="exampleFormControlSelect1"> <option id="showDetails">Show details</option> <option>Notify</option> </select> So I have this jquery below, but the modal dont appears. Do you know why? $(function() { $('#showDetails').change(function(){
array in data attribute selector
Hi, I am breaking up a string using regex (see here: https://regex101.com/r/mGdwOQ/1). I am then trying to do a .filter() for certain elements based on the entered criteria. How can I use .filter() to look for multiple values in both the data-label and data-value attributes? .aspx page: <span data-label="name" data-value="<%# DataBinder.Eval(Container.DataItem, "Name") %>"><%# DataBinder.Eval(Container.DataItem, "Name") %></span> <span data-label="date" data-value="<%# DataBinder.Eval(Container.DataItem,
Using JSON Data for Live Information
Hi, i need help. At the moment i have this on my site dashboard.php $(function() { $.ajax({ type: 'POST', url: 'inc/elevators.php', dataType: 'json', success: function(data) { console.log(data); } }); }); And my elevators.php has this result [ { "equipmentnumber":10015810, "type":"ELEVATOR", "description":"zu Gleis 6/7", "geocoordX":6.7941232, "geocoordY":51.2202587, "state":"ACTIVE", "stateExplanation":"available", "stationnumber":1401 }, { "equipmentnumber":10015811,
Basic JQuery game
Hello, i have a problem. I´m pragramming a simple memory game but i need match two different images. With different file names like 01.png and 01_.png. Can you help me with it in this code? It's my first jQuery program and I'm beginer. Thank you so much for response. <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <title>JQuery Memory Game</title> <script type="text/javascript">
reverse of .animate on scroll
hello. i want to scale down my navbar on scrolling down and animate it back to normal by scrolling up. The first step works perfect, but i don't get it resetted. Any help appreciated, snote $(function () { var lastScrollTop = 0; var $navbar = $('.navbar'); $(window).scroll(function(event){ var st = $(this).scrollTop(); if (st > lastScrollTop) { $navbar.animate({ right: '10px', width: '150px' }, 2000, "linear"); } else { $("navbar").removeClass("animate")
how to show specific time zone in website?
Được ví như nghệ thuật trang điểm vĩnh viễn, phun phiêu môi thẩm mỹ đang trở nên 1 trong những hình thức làm đẹp bậc nhất được hồ hết chị em đàn bà Đánh giá và trải nghiệm. Hình ảnh bờ môi căng mọng, gợi cảm và tươi tỉnh luôn gắn liền mang sự tài tình khéo léo của “Bàn tay vàng” Phượng Hồng Kông. Người nữ giới đẹp đã sáng tạo và truyền cảm hứng cho nghệ thuật phun phiêu thẩm mỹ ra đời và phát triển. xem thêm:[url=https://phunxam.com/ban-co-dang-thac-mac-phun-moi-gia-bao-nhieu/]phun môi collagen giá
How to turn a specific tab active when a link is clicked?
I have the layout like is in the fiddle using bootstrap tabs. The issue with this context is that when a pagination link is clicked in some tab, for example, if the user is in the tab "Draft" tab inside "My Congresses" tab, and clicks in the pagination link "2", the url changes to "http://proj.test/user/profile?page=2#myCongresses" but the tab that become active his the first one ("Update user info") tab. Then if the user clicks in "My Congresses" it appears the results of the page 2, but the user
How to write THIS jquery ajax code in PLAIN js to send to PHP?
I've been using jquery ajax all over my website to return data from PHP as json_encode(). And works fine in Firefox, but Chrome, Safari and mobile browsers make the users ajax requests like 10 times slower. I do receive a TON of JSON's coming from PHP back to my jquery success. I've been trying to replicate this jquery ajax code to receive it in PHP as I receive it with jquery, as a $_POST superglobal for each JSON element.. I've tried a lot of different ways with plain JS but couldn't get it to
code messier than it should be
I have groups of check boxes. When a checkbox is ticked/unticked i want to check if any check boxes in the same group are checked. I have the following HTML, this is dynamically generated so there could be any number of 'groups' <div class="group"> <span class="title--bold">Time Found</span> <span><input type="checkbox" name="vehicle" value="Bike"> Today</span> <span><input type="checkbox" name="vehicle" value="Bike"> Yesterday</span> <span><input
Problem with Jquery
Phun môi thẩm mỹ mang thể cải thiện tình trạng môi dày, môi mỏng, thâm, đen cho phái đẹp. Nó giúp trở thành hoàn thiện hơn mà không cần phải giải phẫu mà màu sắc vẫn luôn hồng hào, tươi tắn. Nó cũng loại bỏ vĩnh viễn việc phải dùng bút chì kẻ viền môi hay tô son hằng ngày. XEM THÊM:[url=https://phunxam.com/ban-co-dang-thac-mac-phun-moi-gia-bao-nhieu/]phun môi pha lê giá bao lăm[/url] Thiếu những thỏi son, nghe đâu gương mặt phát triển thành nhợt nhạt và kém sắc. Và việc quên đánh son không khác gì
containment is not working with Drag Drop and Re-sizable div
"containment " is not working with Drag and Drop. Kindly check the below code. // JavaScript source code $(document).ready(function () { //Counter counter = 0; //Make element draggable $(".drag").draggable({ helper: 'clone', containment: 'frame', //When first dragged stop: function (ev, ui) { var pos = $(ui.helper).offset(); objName = "#clonediv" + counter $(objName).css({ "left": pos.left, "top": pos.top
How can I use promise() in jQuery each
I have code below: function checkboxAssign() { _locationIds = $('input[name=location]').val(); _zoneIds = $('input[name=zone]').val(); _regionIds = $('input[name=region]').val(); _categoryIds = $('input[name=category]').val(); $('input[type=checkbox]').each(function() { $(this).attr('checked', false); }).promise().done(function() { if (_locationIds != '') { locationIds = _locationIds.split('-'); locationIds.forEach(function(el) { $('.search-zone input[type=checkbox]').each(function() { var dataType
Resume after preventdefault()
I am using event.preventdefault() to prevent various default events occurring. I Displaying a modal / lightbox window instead. The window has some buttons one of which will allow the event to continue. Is there any way to store the prevented event and run it later? If it helps although the elements which have prevented events are very dynamic i can be certain that the only event which may need to be continued is the last one which was prevented perhaps the event.isDefaultPrevented() can help
jQuery job but only after the default behavior
When user clicks the Escape Key I need to do some jQuery job but only after the default behavior has finished. Does anyone knows how to do it? If so also to drop her some snippet to demonstrate? Thx
An image rotation 360º with jquery animation NO css?
I need to rotate an image 360º with jquery animation (no CSS) when I hover the image with the mouse, also the image is in movement, I don't know if it afects. Thank you.
Two animation working at the same time ?(read the description, I don't know how to formaulate it with a question)
I have an animation that works on a click, so the element(1) goes where I click, but I have another element(2)that increases with a click, the problem is that when I click element2 I don't want the element1 to follow the mouse. Thank you.
How can I make an image move to the right, then flip, and then move to the left, using selectors and functions?
I have an image of a fish and I need to do an animation so the fish goes from one site to the other, but when it reaches the top of one side I want to flip the image so it doesn't look that it's swimming back. I've started doing this: $(document).ready(function () { $("#fish").animate({rigth: '200'}, 2000); and for fliping the image this: transform: .css({ 'scaleX(-1)' }); and I guess for turning back it's the same as the first one just changing directon left. But I don't know how
How to insert certain code/text after all <h3>...</h3> elements?
How can I insert a certain text (or HTML code) after all <h3>.....</h3> elements? A code like <h3>foobar headline</h3> nextline should look like afterwards e.g. <h3>foobar headline</h3> insertedline nextlineresp <h3>foobar headline</h3> <p></p> nextline
LS not stopping dupes
(function() { //localStorage.clear(); // Parse the JSON stored in allEntries var existingEntries = JSON.parse(localStorage.getItem("allEntries")); if(existingEntries == null) existingEntries = []; var entry = $(".entry").text(); localStorage.setItem("entry", JSON.stringify(entry)); // Save allEntries back to local storage existingEntries.push(entry); localStorage.setItem("allEntries", JSON.stringify(existingEntries));
If url path contains text, but doesn't contain other text?
Hey Guys, I have three url paths I need to check the text strings in them and do different stuff for each one. My paths are: Audio/! Singles !/ Audio/Albums/- Various Artists -/ Audio/Albums/ These folders all contain numerous other folders one for each album, Some also have sub folders for multi disk sets. What I need to do is run a different script depending on what folder it is in. So far I have: var test = $('#pathname').text(); if (test.toLowerCase().indexOf("! singles !") >= 0) {do stuff -
using jquery for form entry
Please pardon my inexperience with jQuery as I dove into it in order to solve a simple data issue. I use a very simple web form to submit entries in a MySQL database. Originally, this was a basic web form (using PHP) that would submit the data and refresh the page. Seemed simple enough. Unfortunately, doing that dozens, even hundreds of times, daily, ran up my data usage on my free web hosting site (this is for a hobby). My solution was to not refresh the page, but still submit the data. Welcome
Reponse to jakecigar
JakeCigar, Got an email that you had responded to my post, the email is below: jQuery Forum Hi, jakecigar has replied to the topic you follow., Exception was thrown at line 3670, column 8 in https://code.jquery.com/jquery-1.12.4.js. Did you start off your page with <!DOCTYPE html> <html> <head> <meta charset="UTF-8" /> <title>Some title</title> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> Without the meta you may wind up in IE6 mode! JΛ̊KEI clicked on the button in the email
FadeOut Ajax Response FadeIn
As the subject says, I want to fade out my current content, add my ajax response content and fadeIn my content. This is what I have $("#page-content").fadeOut(2000).html(result).fadeIn(2000); What's happening is my AJAX response is showing then it's fading out and in. Here is my full code $(document).on("click","#news-btn",function(e){ $.ajax({url: "getContent/news.php", success: function(result){ $("#page-content").fadeOut(2000).html(result).fadeIn(2000); }}); });
JQUERY ANIMATE BACKGROUND IMAGE
THIS IS MY ERROR THIS IS MY CODE JS <script src="../_layouts/15/Scripts/jquery-3.3.1.min.js" type="text/javascript"></script> <script src="../_layouts/15/Scripts/SP.js" type="text/javascript"></script> <script src="../_layouts/15/Scripts/SP.Runtime.js" type="text/javascript"></script> <script> $(document).ready(function () { var x = 0; var y = 0; var banner = $("#banner"); banner.css('backgroundPosition', x + 'px' + '' + y + 'px'); window.setInterval(function ()
Show the correct active tab based on the href attribute is not working properly
I have this jquery to give the class active to a tab when the url has the correct hash. This is working fine with the code below, then the user accesses for example "http://proj.test/user/profile?user=1#myTickets", the #myTickets tab becomes active. But I want to have this dynamic because there are more tabs, for example, there is a tab #editPassword", and when "http://proj.test/user/profile?user=1#editPassword" is accessed the tab #editPassword should become active. So the code is working if is
How can I edit css with a click only for a few seconds?
I need to change an image size by a click for a few seconds and then it should return to the original size, using functions and selectors. I changed the size but I don't know how to return to the original size. $(document).ready(function () { if $("myId").click(function () { if $(this).css({ width: "500", height: "500" }, 1000) }); });
What is $(this) in document.ready ?
Hi, I just wonder what is $(this) inside the document.ready refer to? I try to parseHtml and get the object by using $(this) without success. I try to search to forum here but since it too generic keyword I get no result. Can someone here guide me or tell me what is $(this) refer to? Best, Shin
Next Page