Can Can i permanently change the value of a button?
Hi sir, I am currently using jquery in ASP.Net mvc razor View, and want to change the value of button permanently, I did some coding which works but the problem is i refresh the page it again change the value to original one, the button value is Lock when i click on it i want it to be Unlock which it does but after refreshing the page it again become Lock, Here is my code; function change() { var elem = document.getElementById("lockId"); var orderid = document.getElementById("order_no");
Trying to write login function using ajax
Hi everybody, i'm writing easy ajax login function using angularJs, but i got some question which relates ajax, this is my function: $scope.login = function() { $.ajax({ type: "POST", url: "http://ce.mauris.info/en/api/auth", data: {email: "test@test.com", password: "1111"} }).done(function( msg ) { $location.path('/app/feed'); }); } // login when i come to my login.html, i can just click on a button and go to '/app/feed' i thought that i have to enter data
API_unique bug in IE 8
<script src="jquery-1.11.3.min.js"></script> <script> $(function(){ var a1=$("#u li"); var a2=$(".red"); $.merge(a1,a2); $("div").eq(0).html(a1.text()); $("div").eq(1).html(a1.length); $.unique(a1); $("div").eq(2).html(a1.text()); $("div").eq(3).html(a1.length); }); </script> <body> <ul id='u'> <li>a</li> <li>b</li> <li class='red'>c</li> </ul> <ul> <li>1</li> <li>2</li> <li class='red'>3</li> </ul> <div>?</div> <div>?</div> <div>?</div> <div>?</div>
retrieve data from mysql database
Hi, I'm trying to retrieve data from Mysql: <script> $(function(){ $(".btn-reparto").click(function(){ var reparto = $(this).text(); $.ajax({ url: "dbscript/getArticoloComanda.php", data: "", dataType: 'json', success: function(data) { for (var i in data) { var articolo = data[i]; $('#articoli').append('<input id="' + articolo[0]
Newbie... question about pages
I just started and made a test site with 5 page ( linked to the header menu in the demo downloaded ). When I link them to separate pages ( like I usually do with we sites ) it does not like the url unless I use a full url. After reading a little more it looks like all the pages should be in the same file. Is this how the site should be created? It there anything special you should do if linking to another webpage. <li><a href="signup.html" data-icon="clock">Signup</a></li> I guess my question
how to use .add.class.remove.move?
I want to know how to use .add.class and .remove.class im confusing and .css not work. I just did .css and work but when i combine with other function it is not. 1. I want to add $('img a') float to right, margin left and right, (i know it) 2. then move the $('p.mobile-photo') to other div (not append or prepend, i mean inside the div 'separator' class) i don't know this script 3. then remove the <p class> after all i want to move the separator class to the top of desc class (i use before but not
Going nuts trying to find the syntax error! Help!!
I've been looking for the syntax error in this snippet for hours. Can you spot it? Here's the page (last section only; "Fiberglass Boattails"). Select an item to show inputs. http://m.publicmissiles.com/tailcones.aspx Please help. Thanks. ---Frank //find FNC Slotting in array for (var i = 0; i < productArray.length; i++) { if ((productArray[i][0]==SLOTTINGFNC)) { document.getElementById("FBTLslotting_price").value = productArray[i][2]
page loaded with: $ load ("#"), not stylize
how to call another page with jquery using css that is loaded on the main page? is possible with $("#id").load()?
Jquery stripping xml tags
Hello, I'm trying to make a simple jquery class for use as a Construct 2 plugin. It's for creating an xml inventory. The problem is somewhere in the first function jquery is stripping all the tags from my xml. I've ran alert through the add_item function in various locations, but can't seem to find the problem. Also my remove_item function isn't doing anything.. I think that's because of the tags being stripped in add_item function. Thanks for taking a look. All html is here to so anyone can run
Populating hidden field in a form via button click?
Hello, Very new at jquery (actually trying to modify a small app created by a programmer) and trying to figure out what I am missing to populate the value of a hidden field for a form that pops up in a window (modal) via a button click. Code for the button click: <script type="text/javascript">$(function() { var message = "149"; $( "#create-user" ).button().click(function() { $("#hidden-input").val(message); $( "#dialog-form" ).dialog( "open" ); });});</script> When i use the following code below,
how to writing codes one time for diffrent situations?
Hello, please look at this code that I wrote, I have to define screenWidth for two times and also I have to wrote my codes inside and outside window resize. Is there a better way for this: html <body> <div class="first">First</div> <div class="secound">Socound</div> </body> jQuery $(document).ready(function(){ var screenWidth = $(window).width(); if(screenWidth <= 980){ $('.first').insertAfter('.secound'); } $(window).on('resize', function(){
JQuery Context Menu Hover Sub-Menu Closing Issue?
Right Click and open context menu then open the sub menu. Click on outside of Context menu without closing of sub menu.Context menu is close. Again right click and open context menu still sub menu is in open state. Please any buddy help me to find out the solution of this issue. Thank you in advance.
download jquery dosn't work, big problem, so sad :-(
Hello, i am new to jquery and want to work with it. But if i download jquery, i cant open it. There is just this: and when i want to open it, that happend : maybe you can help me with this problem. I am feeling so lost.
cant start with jquery, installation impossible, please help
Hello, i am new to jquery an want to install it. I downloaded jquery from the jquery page an get this in my download folder: If i try to open it, it do not work and following happent: what is wrong with it? please can you help me? i am so frustrated :-(
change value in a cell
Hi, I'm trying to achive this result: I have a table with some key/value (SKU/Quantity), by a some button I add a SKU Item to table. Everything work fine, but If the SKU Item is in table I would like update the Quantity +1 TABLE: | SKU | QTY | |A01 | 10 | |A02 | 5 | with my button now I add another A01 how to change the right quantity cell? $("#comanda").find(".idart").each(function() { idPiatto = $(this).html();
get the button name with document.getElementById
hi, i want to develop a script on that i only have to set the names like this : <button name="1" id="url" onclick="myFunction()">1</button> <button name="2" id="url" onclick="myFunction()">2</button> <button name="3" id="url" onclick="myFunction()">3</button> <script> function myFunction() { var $x = document.getElementById("url").getAttribute("name"); $.post("worker.php", { Page: $x }, function(data){ $("#content1").html(data); }
Strange results with autocomplete
I plopped an input box with auto-complete turned on and a search button on my page. My friend created some JS code to allow the auto-complete to access an array of kit names. Well, it works perfectly except for the list it generates. The list is correct and clickable but the text itself is just floating over the page content (in this case the search button). It looks kinda bazaar and is transparent in terms of the search button is clickable through the floating text. What are we missing here? Here
json not populating fields
Hello sir This might be silly question. I can populate the form fields using JSON I select a client from dropdown and based on its value (id) i call JSON and populate the respective fields what if the the client id selected from dropdown is zero (normally starting item with id=0 like pleases select) ) My Json where to put the initialization code so as to blank the fields populated earlier $('#clientid').change( function() { //change ID when selected from dropdown alert( $('#clientid').val());
J Query Date Picker Condition
Hi All, I need to display a j Query Date Picker where we have to show today and tomorrow date but if today is Saturday then i have to show Monday date also Please suggest
How do i know what script running in element
title say it, long version: my blog using template which contain script for shorting post content (summary), im trying to edit one by one script to increase summary length on my blog but nothing change. I found almost similar script that contain 'summary' on my blog but every time i change the summary var larger than before, nothing change in the page, the summary of my post still too short. so here im wondering is there any way to know what/which script that according from an element of my blog?
Simple issue: why has this suddenly stopped working going from 1.10 to 1.11?
I'm not totally new to jQuery, but I'm not an expert, and I don't keep up on all the changes from one version to another. I have one site that was originally designed using jQuery 1.10.2, and a couple pieces of simple, straightforward inline javascript have suddenly stopped working when jQuery was updated to 1.11.3. They are these: onclick="$('#login').slideDown('fast'); return false;" and onclick="$('#bannerBar').fadeOut('fast'); return false;" I imagine it must be something as simple as a change
Can't sign in to Facebook using code and IE11
Hi, It might be the wrong forum for this question but since I don't find a solution I will ask anyway. I sign in to Facebook using the following code - FB.login(function (response) { console.log('Welcome! Fetching your information.... '); if (response.authResponse) { FB.api('/me', function (response) { console.log('Good to see you, ' + response.name + '.'); }); } else { console.log('User cancelled login or did not fully authorize.'); } }, { scope: 'email, public_profile' }); When I use this code
Can jQuery simulate a keyup event that will trigger keyup eventlisteners?
Hey everyone. I'm writing a Chrome Extension that will work with a particular website. On that website, there is a function listening for keyup events in a specific input field and I need to trigger that function and give it a specific keyup event. In other word, when you're actually typing in the input field, a function is called after you release each key with the information of the key that was pressed. Unfortunately, I've had no luck with jQuery's trigger function. Here's a bit of my code: function
Function to imitate JS callback window.onBeforeUnload
I have a script on my site that will set the window.onbeforeunload whenever an input is changed, and when the form is submitted, disable the alert, and submit the form. Current JS: // If any inputs are changed, enable the alert if they change pages (Unless its a .trivial form) // Wait til the page is fully loaded to do so, since some inputs are changed via JS $(window ).load(function(){ $('form:not(.trivial)').find( 'input, :checkbox, :radio, textarea' ).change( function (){ template.nav_alert(true);
How can i check that it is the last record in database table?
<script type=text/javascript src="jquery-1.11.3.js"></script> <input type="button" id="id_load_more" name="nm_load_more" value="Load More" /> <script type="text/javascript"> $(document).ready(function() { var limit = 1; console.log("ready!"); $( "input#id_load_more" ).on( "click", function( event ) { //event.stopPropagation(); $.ajax({ method: "POST", url: "load_more.php", data: {"page":
HTML5 audioplayer works very well except in safari?!
Hello to everyone! I have created an HTML5 audioplayer. It works very well across all browsers except SAFARI. what might be the reason? I would be very thankful to a hint or link.... I have googled but havent found anything. $(document).ready( function () { $( '#playPauseBtn8' ).on({click: function (){ var audio = new Audio( 'aud/mymusic.mp3' ) audio.play(); } }) }) < audio id ="audPlayer8" class ="audPlayer"></ audio > Thank you very much! L.
Pause jQuery slider mousehover
hi everyone, I'm trying to insert mousehover pause and mouse leave resume on my slider. can someone help me? resource: http://www.substellar.it/ex/index-slider.js
How do I find the offset of the bottom of my screen?
How do I find the offset of the bottom of my screen? Suppose I sometimes display a DIV with a high z-index that overlays part of my screen. And suppose sometimes part of this DIV is too low, and so can't be seen. I want to scroll the main page lower, so that the overlaying div can be seen in its entirety. To do that, I need to know 2 numbers - the current y-position of the bottom of the main page, and the current (hidden) y-position of the bottom of the overlaying div. What properties would I
reading content from a additionel file with div id
Hello, I've twoo files. The first one is here. <!doctype html> <html> <head> <meta charset="UTF-8"> <title>Inhalte per Ajax nachladen</title> <style type="text/css"> div { border: 1px solid #ccc; padding: 25px; } </style> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script> function kb_source_2_target() { $.get('source.html', function(data) { $('#target').html(data); }) } </script> </head> <body> <h1>Inhalte
Need help with simple syntax issue
This works to display a number in an input box... $("#tang1").val(TANGwidth.toFixed(2)); But I need to add text before and after the displayed number but can't figure out the syntax. No examples anywhere I looked. I can't even get it to display text alone. I need something like this... $("#tang1").val("some text" + TANGwidth.toFixed(2) + "more text"); To display this: "The width of the fin tang is 2.25 inches" Please help. Thanks, ---Frank
Motorcycle configurator
Hello, I just started to study jquery and i would like if someone could help me with my problem, at least check if it is possible. I have to make a motorcycle configurator where a customer can change color, change type of wheel, change exhaust, apply some stickers on it and 360° right-left and 360° up down view. Like a car configurators with prices and then save a pdf or send configuration to you email. I think that I need to use php and jquery but I'm not coder just know modify some codes. Thanks
Counting Rows
i have fetch rows from database but i want to set their sr # like 1 2 3 according to the number of rows. i have attached snap so that you can understand better.
Creating an elastic grid
Hi, Does anyone know of a good tutorial where I can do an elastic grid like this http://demo.phapsu.com/jquery.elastic_grid/index.php#demo I've downloaded the plugin to view it, but they hard code the image path in the jquery file to display the images and when I try to create a loop in php it doesn't work. So I'm looking for different tutorials that does the same thing
This seems so simple but...
Sorry folks, total newbie to JS and jQuery but I'm learning! I'm stuck on getting this syntax right. I want to use code like this to identify if my image is visible........ <img src="images/fin-1.jpg" id="hid1" alt="" title="01" style="display: none;"> <img src="images/fin-2.jpg" id="hid2" alt="" title="02" style="display: inline-block;"> <img src="images/fin-3.jpg" id="hid3" alt="" title="03" style="display: none;"> if $("#hid1").style= ("display: inline-block"); {
online chat box
hi i want to create online chat box you have seen on many websites there is a section of live chat in corner like that i want to create live chat box can any one help me?
how important is it to know sizzle ?
I have often seen some jQuery experts mostly in online post/articles point out how understanding sizzle.js is important , has anybody of you ever spent time going through sizzle.js ? Is it a handy thing to know how the jquery selectors work internally ?
function called at page ready
I'm not sure if this is a jQuery or a simple javascript question. How can I associate a named function with a button click (or any other jquery event for that matter)? I have two examples, where an anonymous function is defined and assigned to a button, and that example1 works perfectly. The second example I'm trying to define a named function and associate that with the button. In this case, the function executes, and the alert is displayed as soon as the page is loaded, without pressing the button.
How i can made it?
Hi, i want to know how i can create a similar jquery for like this http://www.ciclibrianza.it/bike-builder/ i don't know jquery language, is possible to use some software like dreamweaver or like stuff that for make it in easy way? TNX
How to implement jquery mobile swipe event
Hi, I am developing mobile application and i want to implement swipe event.Here is my code but it is not running. <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>swipeleft demo</title> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css"> <script src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
call back function
HI ALL, Can someone please tell me how a function definition passed as argument to another function in jquery ?? how it works. if you have a look in the below example:- where the function definition is passed as a argument $(document).ready(function(){ $("button").click(function(){ $("p").hide("slow", function(){ alert("The paragraph is now hidden"); }); }); }); Please explain me I am very confused,I am in learning stage. Thank You Very Much,Pratap
Next Page