How to Prevent A SlideDown Event When Mouse Move Back to Handler Element
Can you please take a look at This Demo and let me know how I can prevent/stop slidedown function when user move back the cursor to the handler element For example if you mouse over Home the .tab-pane will slide down and if you move mouse from the .tab-pane to Home tab it will re slide down the content. What I need to detect if mouse is coming from associated .tab-pane do nothing $('a[data-toggle="tab"]').hover( function(e) { $(this).parent().addClass('active'); var target = $(this).data("target");
Jquery Magnific Popup - not working
Hi ppl, I am trying to make Magnific Popup gallery. This is my code: <!DOCTYPE html> <html> <head> <!-- Magnific Popup core CSS file --> <link rel="stylesheet" href="magnific-popup.css"> <!-- jQuery 1.7.2+ or Zepto.js 1.0+ --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <!-- Magnific Popup core JS file --> <script src="jquery.magnific-popup.js"></script> </head> <body> <a class="test-popup-link" href="images/large_image_1.jpg">Open popup</a> <script type="text/javascript">
Datepicker - visibility issues
Hi there, I've just got round to using the datepicker for the first time in a project. I've got it working but I can hardly see it as it has no background fill, how would I set this? Thanks
Sending Data
Hi guys, First time posting. I am working on an application were the user scans a qr code and the information relating to that qr code is stored in a database. So far this is what I have ... This is the scanner functions $(document).ready(function () { $("#insert").click(function () { var serial_no = window.localStorage.getItem("serial"); var user_name = window.localStorage.getItem("user_name"); var company_id = window.localStorage.getItem("id");
Add scroll to div
I am trying to add a scroll event and drag event to a container. I added the scroll event to the window but cannot specify the container. I am looking to create an image sequence and cycle thru the images on scroll and on drag. <div id="container"> <img src="frames/noindex_basset_02_img000.jpg" class="animated"> <img src="frames/noindex_basset_02_img001.jpg" class="animated"> <img src="frames/noindex_basset_02_img002.jpg" class="animated"> I have 61 images in the container, just posted to code
Chosen Plugin issue when clone to next row.
Hi Im trying to use Chosen plugin in my project (https://plugins.jquery.com/chosen ) And clone the row when user click + icon ("glyphicon-plus') but Im not able to change the value of the new row . below is the runnable code to reproduce the issue , any one have idea to fix this issue Please https://jsfiddle.net/karthisena/mL4trwut/ Thanks Karthisena
Time filter
Hi can anyone suggest how we use in between time filter on json object this is my JSON object [{"dep_time":" 8:35 AM","arr_time":"9:55 AM"}, {"dep_time":"10:00 AM","arr_time":"11:05 AM"}, {"dep_time":"1:00 AM","arr_time":"03:10 PM"}, {"dep_time":"12:00 AM","arr_time":"01:10 PM"}, ] i need to filter based on time. ex: find an object in between dep_time=08 am and arr_time = 11 am
need help?
function getMessageText() { return $('message').text; } document.body.innerHTML = '<div id="message">The message</div>'; console.log(getMessageText());
After each refresh, the previously selected row will be selected
Hi, I have a issue. I want after each refresh, the previously selected row will be selected. I have no idea for it. I tried localStorage but not work, maybe i'm wrong syntax. Help me! My code: $(document).ready(function () { setInterval(ajax, 150000); $('button').click(ajax); function ajax() { $.ajax({ type: "GET", url: "demo.json", success: function(result){ var output= "<table class='table'><tr><th>ID</th><th>Name</th><th>Type</th>"; for(var i=0; i<result.length-4;i++){ var ran = result[Math.floor(Math.random()*result.length)];
Classes and Database Connection reuse
I have a php file that has all my database credentials using PDO. I have a class file that contains all my classes. In the class file I find myself creating the database connection in every function: class myClass { /* Properties */ private $conn; /* Get database access */ public function __construct(\PDO $pdo) { $this->conn = $pdo; } } What should I be doing so that I am not doing this in every class?
JQuery dialog box not showing close icon
Hi All, I am using JQuery dialog box. It is not showing close icon. Below is the code: open_menu.js ------------ <script> $(function () { $("#menu-dialog1_UC1").dialog({ autoOpen: false, width: 350, height: 250, title: "Menu for UC1", position: "center" }); $("#open-menu-dialog1_UC1").click(function () { $("#menu-dialog1_UC1").dialog("open");
Highlight the Selected Menu Item with one href ="/"
I am seeking help in resolve the following problem. I have created a menu and use JQuery to highlight the selected menu item (WordPress site). But one of the href used has to be "/" for home page. When selecting any other menu item the item for the home page is always highlighted. The following are the codes: HTML <style> .active { color: red; font-weight:600; } </style> <div id="custom-menu" class="custom-menu col-full" style="border:0px solid red;"> <ul> <li><a
passing variable via ajax
// Custom Ajax jQuery.loadScript = function (url, data, callback) { jQuery.ajax({ url: url, success: callback, data: data, async: true }); } // Execute Function $.loadScript('js/modules/upload.js', {name:'anoluck'}, function() { console.log('TEST'); }); // upload.js $(document).ready(function(){ how do I get parameter name? }); How do I get the pass in parameter when loading an external javascript while passing in a variable? I tried
jQuery draggable element detaches from resizable parent after drag
I have this: <style> #pic_wrapper{ display: block; position: relative; padding: 0; } #selected_picture img { width: 100%; height: auto; } .pin { display: none; position: absolute; height: 50px; width: 50px; padding: 0; margin: 0; } </style> <div id="pic_wrapper"> <div id="selected_picture"> <img src="map.png" /> </div> </div> and append markers to the image with: <script type="text/javascript" charset="UTF-8"> $(function(){ $('#pic_wrapper').resizable(); $('#selected_picture').on('click', function(e){
tablesorter customer parser not working properly
Hi Tablesorter was working fine until I tried to add in a custom parser as per the help page. Now what happens is that you can't sort any column ONCE - after this everything freezes. (So if you click the same column again you don't get the opposite sort like you should ) I am something of a newbie so i wasn't sure where to put this code... so I put it at the end of my jQuery file. Can anyone help please? $.tablesorter.addParser({ // set a unique id id: 'mlevels', is: function(s)
boostrap 3 line navigation (hamburger)
I am used to bootstrap having the 3 lines navigation icon when menu is display on a phone. I was surprised not to see the same navigation available on jquery mobile. 1. Is this something that is plan as a new feature in jquery mobile? 2. Anyone has an alternative that works? I tried some plugins but NONE display correctly. I dont think the ones I tried were design to work with jquery mobile Thank you
AJAX AND JAVASCRIPT API INTEGERATION
Hello,I am developing an Inventory Management system webapp.My view is using data tables showing list of vendord,stores and admin .i have an delete and Edit icon.Iwant to integrate my api in these icons . THE API'S ARE 1.Delete user by id using post method 2. Edit user using update method I am using AJAX JQUERY Api Integration. Please provide some help Code is as follows: txt += "<a href='editsubadmin.html?id="+dd+"'><i class='fa fa-pencil fa-1x' aria-hidden='true'></i></a> | <a href='' onclick='delete_data("+dd+")'>";
Unable to set a fixed width and center custom scrollbar
I am working on some kind of carousel with items aligned horizontally. Each of the child elements (there will be about a dozen of them) should stretch one third of the parent's width. Three items should be visible at any one time. I have used Bootstrap 4, some custom CSS and the Perfect-scrollbar plugin. HERE is a jsFiddle. It came out pretty nice, except I have been struggling to find a way to set a fixed width (of 300px) for the rail (the gray line) and centering it. How can I do that?
Open jquery accordion with dynamically generated id using link on same page
I have the following accordions, below, on my page, however, I am looking for code that will work regardless how many accordions there are on the page. My goal is to have links on the same page that open either of the accordions. I have yet to find javascript or jquery that will account for dynamically generated accordion id's. Any help in pointing me in the right direction would be greatly appreciated. Thank you! Peter T <div class="unit-100 accordion"> <div id="1"
Putting datepicker in an external file doesn't work
Hi, I'm quite new to Jquery and can't wrap my head around the problem I have right now. I have this code: //Changing date format to dd/mm/yy in French. $.datepicker.regional['fr'] = { closeText: 'Fermer', prevText: '<Préc', nextText: 'Suiv>', currentText: 'Courant', monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin', 'Juillet','Août','Septembre','Octobre','Novembre','Décembre'], monthNamesShort: ['Jan','Fév','Mar','Avr','Mai','Jui', 'Jul','Aoû','Sep','Oct','Nov','Déc'],
jQuery event object
Hi! I have a perfectly working script to toggle classes. ;-)) Now I have a gallery "lightgallery" which should control the toggle. Instead of clicking on a button to toggle the classes, the classes should be toggled when the gallery opens. I have this js to toggle my classes by click: <code> $(function() {
$("#kuenstler").click(function(){
$("body").toggleClass("scrolled-down-20"); }).scroll();
}); </code> This is the code provided by lightgallery: <code> var $lg = $('#lightgallery');
failure in Fununit because of not accessing assert inside hooks
I want to use Fununit3.4.2 with Qunit2 but because of a bug in funcunit, I am not able to use Funcunit. I have opened issue on the funcunit github page but I think the funcunit fix will require in-depth knowledge of Test object in QUnit2. The problem is with the Qunit2 adapter code in Funcunit: https://github.com/bitovi/funcunit/blob/7ec6932b44f2590f30ac98bc091bb43f8f4886ae/browser/adapters/qunit2.js#L17 In QUnit1.x the assert was associated with the global QUnit object but in QUnit2 the assert needs
Syntax Validator (Error)
Good night people! I have a problem with not knowing jQuery very well. I installed "Linter-eslint", "Linter-jshint" among other plugins in my Sublime Text 3 to help me find the error, but I did not succeed. I tried using up the Esprima ( http://esprima.org/demo/validate.html ). My code is a form that goes through 4 steps until it is submitted. Can someone help me see where the error of my code is? And what tip can you give me to debug and debug my future codes to avoid such questions in the forum?
how to find links in nested iframes and append an on-click listener
I have a page that can contain any number of iframes, and those iframes can contain their own iframes, etc. (SharePoint 2013 web parts). I don't know the IDs of the iframes ahead of time and can't control that. I also cannot control the class names. The iframes DO all reside in the same domain, so that part won't be a problem. Is there a way to iterate through all of the iframes in a document, and all the children as described above, such that I can examine the links in each iframe and attach a "click"
Loading of jQuery files fails
Hello, I have a page using jQuery which is supposed to load the following files from code.jquery.com: //code.jquery.com/jquery-1.12.4.js //code.jquery.com/ui/1.12.1/jquery-ui.js My problem is that on some computers the loading of these files fails and so the page does not work. If I wait a minute or so the files do load. All other files download without any problem. Is it reasonable that it takes so long to load the files? Thank you for any assistance, Shimon
JQuery dialog box creating an additional small icon
Hi All, I m using an image in html page. When its specific portion is clicked, it opens jquery dialog along with small icon. When i close this dialog still that small icon appear on html page and if this icon is clicked, it opens dialog box again.I want to remove this additional small icon. The code is: open_menu.js ------------------- <script> $(function () { $("#menu-dialog1_UC1").dialog({ autoOpen: false, width: 350,
setinterval function not repeating
Hi All, I am using setinterval() which should reflect the values on every 3sec. But it is reflecting changed values only when i do refresh of html page. HTML code: <div id="#anuj" onload="call_periodically_UC1()"> function: function call_periodically_UC1() { setInterval(function () { callme(); }, 3000); } $(document).ready( $.callme = function () { $.ajax({//create an ajax request to display.php type: "POST",
Getting null while doing jquery ajax call to read data from database
Hi All, I am calling jquery-ajax function to read data from database using servlets and display in html page on page load. But in html age, its coming as null. Code is as below: <div id="anuj1"></div> $(document).ready( $.callme = function () { $.ajax({//create an ajax request to display.php type: "POST", url: "ReadDataBaseValue", dataType: "html", //expect html to be returned success: function (response)
Using Datepicker in AngularJs ...
... Trying to figure out how to manipulate the body of the rendered Datepicker to add a custom header and footer, but not having any luck. I've tried a few things now, but am at a loss on what to do next, nothing's working. I've attempting trying to do something equivalent to this: $('#ui-datepicker-div').prepend('<div><h1>A New Header</h1></div>') (works fine from chrome devtools directly on the element) from the directive's beforeShow event, but this is simply getting ignored. Any ideas on how
Compare two date in table columns and perform functions
Dear jQuery Gurus and friends, I am new in jQuery, i need your help to solve one task. I have a data table, there are two columns of dates (a target date and actual date). If actual date column is blank and date past from targeted date, run function 1 (overdue) If actual date column filled and date past from targeted date, run function 2 (Late completed) If actual date is happened before targeted date, run function 3 (completed) If actual date blank, run function 4 (under process) var target_Date
Two almost identical AJAX calls, very different performance.
Hi All, I have a jQuery AJAX call that is driving me crazy. I hope someone can help. I have list of items in a scrollable div, and when the user scrolls to the bottom, I load more (like the Facebook notifications, which is what I am using as model). When the scrollbar reaches the bottom, I make the AJAX call, but it takes about 3-4 seconds. I know it doesnt normally take that long to return things via AJAX for me, so I started to see why. What I noticed is that, even though the AJAX call takes 3-4
is it possible to extend values and variables as you can with elements?
I'm looking into writing some jQuery extensions. Example: $.fn.IsTest = function () { let result = this.val() === "test"; return result; } Usage: $("select").IsTest(); So far I have written extensions for the input element and as you can see I use val() to get the value. but is it possible to write an extension for the value itself or a variable? Ex: $.fn.IsTest = function () { let result = this === "test"; return result; } Usage like this: $("select").val().IsTest(); let v = "test";
Please help me
như vậy như cách thức phun môi tình cờ khác, phun phủ bóng môi lụa tại Thẩm mỹ Phú Xuân sử dụng cây phun xăm hiện đại, có đầu kim siêu nhỏ và mảnh gắn bầu mực ở phía trên. các chuyên gia thẩm mỹ sẽ tường tận phun màu mực trong khoảng đầu môi này sang tới hết đầu môi phía bên kia bằng màu mực chiết xuất trong khoảng những thảo dược tự nhiên. xem thêm:[url=https://phunxam.com/ban-co-dang-thac-mac-phun-moi-gia-bao-nhieu/]phun môi pha lê giá bao nhiêu[/url] cách thức này chẳng hề gây đau bởi chúng chỉ
jquery loading bar for a specific div
Hi, I have a DIV within the site which relatively loads very slowly. Can anyone help me in this? My requirement is to have a loading bar for this specific DIV only, even as the rest of the site loads independently. Thanks, Kumar
Creating a "spotlight" effect with draggable
Hi all, I'm aiming to create a 'spotlight' effect using JQuery draggable. For example, the area that is draggable reveals the image underneath it much like a 'spotlight' while the rest of the image remains black. Hope that makes sense. I've figured out how to use draggable but not sure if it is possible to tweak to do this. Thank you, Alex
Updated jQuery Not Working On iPhone
I have no experience with jQuery. I want to upgrade the jQuery request from 1.11.3 to 3.3.1 on my site. I changed a depreciated event alias (.load) from $(window).load (function() {...}); to $(window).on ( "load", function() {...}); and updated the link from 1.11.3 to 3.3.1. This works on my desktop and iPad but not on my iPhone iOS 11.3.1. Is there a way I can fix this? Thanks!
Need Help with selecting a list element from ul. List elements are built dynamically from database reads.
Need Help with selecting a list element from ul. List elements are built dynamically from database reads. Here is the code snippet. Part 1. Basically reads the database from a server and post matching suggestions. Which is working absolutely fine. var scopeName = debounce (function(arg) { var value = arg.trim(); var scope = $("#scope").val(); var cc = $("#find").attr("class"); $.get ("/q/"+scope+"?q="+value, function(data){ if( value.length > 0 && cc =="hideme" && (data[0] != undefined || data[0]
Trải nghiệm cảm giác lướt web tốc độ cao cùng gói F2 FPT
Tính đến thời điểm hiện tại trong số các gói cước mà nhà mạng FPT cung cấp thì gói F2 FPT sở hữu nhiều ưu điểm nổi trội cả về tốc độ truy cập cũng như giá cước, thích hợp sử dụng với nhiều đối tượng khách hàng khác nhau nên được nhiều người tin tưởng và lựa chọn đăng ký. Do có khả năng hỗ trợ cả cho những khách hàng cá nhân, hộ gia đình và doanh nghiệp nên khi FPT Telecom triển khai gói cước này, quý khách hàng sẽ có thêm nhiều sự lựa chọn hơn. ===>> Click để xem thêm xem khuyến mãi lắp đặt cáp quang
Good Chatbox Plugin
Hello - I want to build chatbox capabilities for my own website. Does anyone here have any experience with chatboxes? If so, is there a plugin you would recommend? Also - can you give me a quick summary of how chatboxes work on the backend? When site visitors enter something into the chatbox, I'm assuming it's pushed through php? But, how is the response handled? I want live capabilities, where a chatbox pops up on my end if a site visitor chooses to start a chat. Thanks in advance - Pavilion
Sending an attachment via jquery ("input 'file'" always empty)
Hello everyone, I have an e-mail form that I use for my small projects. It works normally! I recently had to add a field for the visitor to send an attached file. When submitting the form all the filled fields are sent, except for the "input file". PS: Validation of fields occurs normally. Only when sending the form all the data arrives until the "send-proof.php" via "POST", less the field "proof". Can someone help me solve this problem with my code? <script type="text/javascript"> $(function(){
Next Page