How can I make my fullscreen menu overlay jump to top before it is opened?
Hello! Happy holidays! :-) I am using the following for a fullscreen overlay navigation. // Menu variables var $menuTrigger = $('#brgr'); var $menuArea = $('#menu'); // Header variables var $headerLogo = $('header > .constraint > .logo'); var $closeIcon = $('nav#menu > #menu-area a.close'); var menuOpen = false; $menuTrigger.on('click', function () { if (!menuOpen) { $(window).scrollTop(0); $menuArea.addClass('is-open'); $headerLogo.addClass('is-open');
Cloning a page but transition to a separate page (not the directly cloned page)
Can anyone help me. I have successfully cloned a page but I don't want to transition to it. https://jsfiddle.net/lammie71/j8w5qwta/192/ As you can see it in the code it changes to the cloned page and works fine: $.mobile.changePage('#page_Result_'+a6, {transition: "slide", reverse: false, changeHash: false}); Although this works fine, I only want to clone the page at this stage and not transition to it. Instead I want to transition to the page #page_Asda. $.mobile.changePage('#page_Asda', {transition:
Unable to resolve dependencies on installation with .Net
Hello, First time post, new to jQuery. I'm wanting to use jQueryUI with .Net C# MVC applications. I already have jQuery 1.10.2 installed in my project. I'm doing some video training that requires jQuery.UI.Combined, which I don't have yet, so I'm trying to install it with NuGet, inside Visual Studio 2017. Since versions 1.12.x require jQuery >= 1.12.4, and I only have jQuery 1.10.2, I'm trying for version 1.11.4 of the UI, since that only requires jQuery >= 1.6.4. But all that's kind of beside the
Label button depending used id
Hey All how can I label my button depending used id? My Code does not work. Best regards Ronny $( "#printOrder, #pdfOrder" ).button({
label :$(this)[0].id == 'printOrder' ? 'Print' : 'PDF' //does not work
})
How can I make this small "for loop" better ?
Hello, I'm about to deploy a website but I'm stuck in this last thing I hope I could get help! So, I'm trying to make this for loop better.. and by better I mean I want to be able to call the function from outside the for loop. But since I have 6 buttons I need the i++ to get a different index for each button so I don't know what to do. I just need to be able to call the function called "my_function" else where but I can't, the only way I can make my for loop and function work is as the following.
MIDI Player Control
Is there a way to submit a suggestion/request for a new widget? Since most browsers have dropped support for plugins, we need a JavaScript based UI control to let a user play MIDI files (for reasons we can't fathom, no browser vendor supports the MIDI format in their <audio> tab). Our site has over 10,000 MIDI files that users can no longer play inside their browser. We are aware of sites like MIDIjs.net, but have not found one that provides a MIDI player control.
Check allconditions before executing aftermath.
I am working on a live validation function. The problem is that the aftermath of the conditions in the function executes executes before the last part is met. The entry validation indicator should not turn green until the conditions are met, however this is not the case. The indicator turns green after the third condition is met. It should not, until all conditions are met. Any suggestions on how I can solve this problem. Code is on Fiddle
hasClass keeps returning false
Hi guys, i'm having a slight issue with my code. The hasClass method seems to return false always, even if the class name matches. Here is the js code; let classAttr = $(this).hasClass("delete"); console.log(classAttr); if (classAttr) { // Do something } else { // Do something else } Your response will be appreciated. Cheers!!
I am stuck on this plz help me
I have three divs having same id <div id=“1”>Click me</div> <div id=“1”>Click me</div> <div id=“1”>Click me</div> I want to hide only which i clicked but when i click on any one all the divs hide. $(document).ready(function(){ $(‘[id=“1”]’).click(function(){ $(‘[id=“1”]’).hide(); }); }); I want to hide only that whick i clicked
I need to check for 5 years of history using jQuery.
Hello jQuery gurus. I'm currently developing a form where our clients are filling out their home and employment address information and I need to check their "from" and "to" dates to see if they're giving us 5 years of address history. I know there have been similar questions asked on here before, but I can't seem to get anything to work for me. So here's my code that I have so far. $("#EmploymentHistoryStartDate").blur(function () { //just using .blur for now for testing purposes. var startDate
Click Event on a class does not trigger when the class is added to the DOM by JQuery
Hi! Code to Test: https://jsfiddle.net/p71L136h/ Need: Add some Link with JQuery to send later to a iframe I have some "<a>" tags with a class "ToFrame" in my html code. When i "click" on thoses link a event is fired so i can send the "href" to the frame. BUT When i "Add" new links (with the class) from JQuery nothing is fired and the Url is directly loaded in the browser (!) I make a little sample to show the problem: https://jsfiddle.net/p71L136h/ Thanks a lot to explain me why this don't work,
Line Break Textarea
Hello, i have the problem that jquery mobile prevents an automatically line break at the end of a textarea row. <form action='textarea2.php' method='post'> <textarea name='area' rows='3' cols='15' wrap='hard'> </textarea> <input type='submit' value='Abschicken'> </form> When i press enter everything is fine and a line break will transfer to "textarea2.php". But if i write more then 15 chars the text goes up to a new line but the line break will not transfer to "textarea2.php". If i not use
how to alert a message for inserting values from the database in a form?
<body> <div class="container"> <div class="box box-warning"> <div class="box-header with-border"> <h3 class="box-title">General Elements</h3> </div> <!-- /.box-header --> <div class="box-body"> <div class="col-md-8"> <form role="form" runat="server" id="loginForm"> <!-- text input --> <div class="form-group"> <label>Enter your name</label>
How to call a javascript function which is inside a jquery function?
Below is the structure $.fn.CreatePayment= function() { ...... function overpay(money){ } }; How do I invoke the overpay function ?? Appreciate help on this
img rotate plugin / reference to jquery object
using https://code.google.com/archive/p/jquery-rotate/downloads this works (rotates first image for some reason, even if there are many) $('#draggable img').rotate(90) this returns ObjectHTMLImegeElement alert($('#draggable img').get(1) ) this returns : TypeError: $(...).get(...).rotate is not a function $('#draggable img').get(1) .rotate(90) ?
Drag/Drop Outlook emails to a Memo Field
Hello Folks: I'll be amazed if anyone has run into this. But, here goes. One of my clients wants to drag/drop his Outlook emails to a web app memo field. He wants me to capture: All email header information including all the FROM: TO: CC: BCC data Entire body of the email Once I capture the information I'll store it in an mySQL table. However - just dragging/dropping to a form memo field now only gets the subject/size Does anyone know of any jQuery UI tools that I can use for reading the entire
trying to get ajax request to work
function loadPages() { var url = "/api/ChartAPI"; $.ajax({ url: url, type: "GET" }).done(function (resp) { //Get the number of pages. //Consider here the page size as 10 var pgSize = resp.length / 10; //If the Result is float, then Round it to 1 if (isPgSizeFloat(pgSize)) { pgSize = Math.round(pgSize); }
draggable
https://jsfiddle.net/agrjxes8/19/ when you run this, the red box is draggable, but you can't focus into it, to paste (CTRL+V) anything into inner contenteditable div. Howewer you can 1.right click/paste 2.click outside red (white area) / CTRL+V It is sure thing applaying draggable prevents focusing red box using mouse click Any comment to that ?
How to open a model on click of an anchor tag?
I'm trying to display a modal on the click of an anchor tag. I have dynamically created anchor tags (within a table and divs), on click of which a modal should be displayed... <a href = "#close" class='forum-title' name = "abc">XYZ</a> I've given the "#close" randomly (to prevent it from throwing an error..guessing it's(href) not imp in this case...) I have given a simple function on the click function of the anchor tag : function openModal() { $('#usermodal').modal('show'); } Please check my JSFiddle
jquery split variable values in array
I have a div with an ID of '#Main" and I am trying to change CSS classes for this div with a collection of variables. using + ' ' + seems to add lots of empty space between classes therefore I was trying to use the split property but so far I am unable to do so. It will be very kind of you friends to kindly solve my issue. My code is as below; jQuery var MainClasses =""; var BackgroundColor=""; var BackgroundPattern =""; var TxtColor=""; // Some code & conditions here which is assigning
what's wrong with this ajax() function?
What's wrong with this ajax function?: <script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"> $.ajax({ url:"https://www.test/api/GetBalance" }) .done(function{ alert('balance retrieved'); }) .fail(function{ alert('error!!!'); }); </script> I haven't used the jquery ajax() function for years. The code above isn't returning an error to the console and it isn't displaying one of the alerts either
problem with multiplication variables from input
i have this code i need to insert one value in the first input and auto calculate in the second and third input <input type="text" name="markup" id="markup"> <input type="text" name="mark" id="mark"> <input type="text" name="marknet" id="marknet"> <script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript"> $(document).ready(function(){ var item1=$("#markup").val() / 100 ; var item2=$("#mark").val(); var item3=item1 * item2; var item4=item3 + item2; $("#markup").change(function(){
Call .net web service from php and set cookiecontainer
I called this web service from .net. this is my code: CertClientWS ec { get { if (Session["CertClientWS_WS_Localhost"] == null) { CertClientWS _ec = new CertClientWS(); _ec.CookieContainer = new CookieContainer(); Session["CertClientWS_WS_Localhost"] = _ec; _ec.Timeout = 400000; } return (CertClientWS)Session["CertClientWS_WS_Localhost"]; } set { Session["CertClientWS_WS_Localhost"] = value; } } But Now i want to call this web service from php code. How can i write this code i n php? I can't set
Some jQuery functions working on one WordPress page and not working on other WP page of same multilanguage site
Hi, I have a strange problem on a WordPress site and after hours of searching I am unable to find a solution: A jQuery script (yes, I use wp_enqueue_script and everything is loaded correctly) does what it is supposed to do on the English page but does not work on the German page as can be seen here: http://dev.lindabra.com/lindabra --> click on button "Find my size" / "Meine Größe finden" . On the English page all the necessary buttons are created (with jQuery append() function) and the input
How to highlight html map area tag when is set some coords?
Hi all, I have a picture and to this set some areas ... but How to highlight map area tag when mose hover? Thank you!
Submit was fired multiple times
Hi, I am working on building a div where people can drag and drop files in the box. The code will upload it to the server automatically. I am trying to understand the cause of malfunctioning of the following code. The pink background bold blue color font part of the code was fired 8 thousand times. Can you help me understand this? also, how I can get it fire only once? Thank you! Jing Jing ----------------------------------------------------------------------------------------------------------------------------------------
My local machine (PC) browser doesn't show jQuery! Pls help me!
Hi all, This is my code. HTML: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Pixel Art Maker!</title> <!--<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Monoton"> <link rel="stylesheet" href="styles.css">--> <script src="jquery-3.2.1.min.js"></script> <script src="designs.js"></script> </head> <body> <h1>Lab: Pixel Art Maker</h1> <h2>Choose Grid Size</h2> <form id="sizePicker"> <b>Grid Height:</b> <input type="number"
JQuery Notification event does not get fired.
Hi, I'm trying to add a notification using JQuery when clicked on a button. <input type="submit" runat="server" id="submit_click" name="submit" value="Submit" class="btn btn-success"/>Associated event should get fired by this : $('#submit_click').click(function() But it does not... I've also tried giving, $('body').on('click', '#submit_click', function (e) {...........}); Please check the below JSFiddle: JSFiddle : https://jsfiddle.net/tj5a5bnk/17/
Jquery cloneYa
Hello, i am using the cloneya plugin in my form. As you can see, one click at the blue button and all the 5 rows with the input fields will be cloned. That works fine! But its very for me to send them via email. It looks like a very complicate array. Have someone an idea? Cheers Andi
Flicking problem when providing position absolute using Jquery
https://test-ridersdeluxe.myshopify.com/collections/ridebukser. Here is my test site. Please let me know how I can solve this problem,
Querystring - Add value to specific variable
Hi, I have this script, it passes the querystring to the next page if you click an <a href> And it adds the value "10". The problem is that it adds "10" to the last value. I want it to add 10 to just the value I want. Example: www.mypage.com?test=123&hello=321 How would I do it if I just wanted the "10" on the test variable (but only if variable "test" exist) so it would turn out to: www.mypage.com?test=12310&hello=321 Apprecite any help, thanks // Daniel My script: $('a').attr('href', function (index, value)
Unable to run BlockUI Asynchronously with other scripts
I'm a bit of a noob, but I've tried this many ways and have been banging my head against the wall for the past week or so trying to find a solution. I've got a search form that when submit is fired, I was hoping to block the browser screen WHILE the other two scripts completed. With my code below, all three scripts execute, but the blockUI fires LAST for some reason. What am I doing wrong? Is this even possible? HTML: <div id="search" class="Column"> <form id="searchForm"
Jquery Autocomplete Normalize data issue
Hi I am using jquery UI autocomplete in my application. I am populating items which are objects with label and value. A value field contains the id of the label item. The issue which I am facing is when the id is 0. In this case, the value field will get replaced by text data present in the label field. This is happening in the "Normalize" method in Jquery UI file. How can I override the Normalize method? Please check the code below. The issue occurs in code highlighted in red. _normalize: function( items ) {
// assume all items have the right format when the first item is complete
if ( items.length && items[ 0 ].label && items[ 0 ].value ) {
return items;
}
return $.map( items, function( item ) {
if ( typeof item === "string" ) {
return {
label: item,
value: item
};
}
return $.extend( {}, item, {
label: item.label || item.value,
value: item.value || item.label $.extend( {}, item, {
label: item.label || item.value,
value: item.value || item.label
} );
} );
}
Run script
Hi I have this script that works fine in the console but won't when code is in the page html. What do I write to get this to run when page is loaded. Maybe I am missing some document ready/function ready or such? The script is to send a query string to the next page if a person clicks a <a> tag. Thanks in advance / Daniel <script> $('a').attr('href', function (index, value) { return value + window.location.search; });
</script>
Jquery Mobile Autocomplete Still hidden after changing "ui-screen-hidden" class
Hi All, I am using Jquery Mobile Autocomplete and able to add my data to list using ajax call. It results me to add list items in UL, initially they comes with class "ui-screen-hidden". I have code to remove the hidden class and add my own classes, but it will not get updated on browser. While debugging i can see class changes in UL items, but when it renders it renders with initial hidden classes which leads to hidden autocomplete ul li. Already
Hidden Image
Hi Im trying to create a page that when the user click on a div a hidden image will appear and scroll dowm the others elements of the page, im a starter on web development and im still learning jquery. (sorry if my english is bad thats not my first language)
Jquery .append list not working
Hello Guys, I have an issue with my jquery and I cant seem to figure it out So I have a home.jsp file and I have two include statements I'm including quicklinks,jsp and activity.jsp In my quicklinks.jsp file i have the following and it displays a list as it should <div class="headertxt">Quick Links</div> <hr> <script> var options = [ { "href": "something1.jsp", "text": "My linktext1" }, { "href": "something1.jsp", "text": "My linktext12" }, { "href": "something3.jsp", "text":
Can a development bundle be obsolete?
My Wordpress-site www.magoster.com gives a fatal error on a Contact Form7-Datepicker part in script-loader.php when customizing the theme (Twenty Seventeen, newly installed). I have no idea what causes this so I try to eliminate possible causes. As private person and not exactly an IT-expert I have some questions. The development bundle I use is version 1.8.5. I have downloaded version 12.1 now. Is it possible that this old bundle can be obsolete and MIGHT cause errors? If so, can I just FTP the
How Do I Fix MY Broken Timer
I am working on a tabata timer but as soon as I tried to put a "rounds" feature in it broke as well as the reset button. SOS. HELP. Below is my code: HTML <head> <!--outside libraries/functionality --> <link href='https://fonts.googleapis.com/css?family=Montserrat' rel='stylesheet' type="text/css"> <audio id="buzzer" src=></audio> </audio> <type="audio/mpeg"></audio> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> <script type="text/javascript"
Error message doesn't disappear when error occurred second time.
Having the flowing jQuery function: function ClusionSuccess(result) { if (result.success) { reloadById(); } else { $("#errMsg").text(result.errorMessage) .fadeIn('slow') .delay(3000) .fadeOut('slow') .queue(function () { $("#btnAddClusion").prop("disabled", false) }); } } So when the else statement is hit first time, the error message appears, stays 3 seconds, fade out
Next Page