Problem with scroll position
Hi masters :) I try to use jquery but i have problem with scroll. My problem is if i click button page scroll go auto to top of page but i dont want it :( ! Someone who have one min to tell me how to fix it. I give you my source here . $("#div").click(function() { // another div element // element.slideToggle(); });
$.ajax is not a function
Hi I just started using jQuery JavaScript Library v3.1.1 and i get 2 errors jQuery.Deferred exception: $.ajax is not a function (15:41:01:532 | warning) at Files/Web_UI/js/jQuery-3.1.1.js:3688 Uncaught TypeError: $.ajax is not a function (15:41:01:535 | error, javascript) at Files/Web_UI/js/jQuery-3.1.1.js:3697 I get it when I run $.post("ajax.php", {action: "InitLoad"}, function (data) { alert(data); }, "json"); in script type="text/javascript"
How to parse variable return back in setInterval
The code below will get every second a price from a .json file. What i need is the result to be parsed back into the updateRate function in order to compare the previous price with the newly updated one... I've googling a lot lot, and some say to use .bind or an anonymous function but i am stuck. What's the way to go here? $(document).ready(function () { function updateRate(type, price) { $.ajax({ url: './json/get_price.php', datatype: "json", data: { t: type, c: price
Semra Beckham-What is arguments object in JavaScript?
Hello, My name is Semra Beckham, What is arguments object in JavaScript? Thanks, Semra Beckham
parseXML explained
All examples show pretty much the same code but without much explanation, could someone explain what each line is doing? I put in the comments my own interpretation but I would really like a confirmation: var xml = "<rss version='2.0'><channel><title>RSS Title</title></channel></rss>"; // parseXML will parse the string to an Object, or as the docs put it: // "parseXMLuses the native parsing function of the browser to create a valid XML Document." // from what I cam see, this is already an object
How to prevent iframe thieves?
Hey, This is what i found on internet: <script> if (self == top) { var theBody = document.getElementsByTagName('body')[0] theBody.style.display = "block" } else { top.location = 'http://google.com' } </script> I would like to get if self url = mywebsite.com or mywebsite2.com show iframe else block iframe error message What is the best way to do that? Thanks!
Younus Shah - What's New in jQuery 3.0 and How to Use It
Hi All, My name is Younus Shah, and working as Sr Director, Global Quality. Could you please tell me What's New in jQuery 3.0 and How to Use It. Thanks, Younus Shah
how can I downlaod the jquery documenation
I do a lot of remote off line work ... Is there an easy way to download the doco? There was a similar question but it is 5 years old and the links are broken in it.
jQuery very small basic version available?
Hi. Is there a very small basic version of jQuery availiable? I mean a very slim version that is only suitable for basic DOM manipulation. Without all the nice-to-have stuff like ajax, UI functions, css effects and so forth. And without explicit support for browser older than around 3 years. The file size should not exceed 20-30 kb.
Simple slideToggle question
My simple JQuery $(document).ready(function(){ $("#one).hover(function(){ $("#two").slideToggle("slow"); }); });my css #two{ display:none; }my html <span id="one">one</span> <span id="twp">two</span>My question: In IE and Chrome, the only two browsers I'm concerned about, when I hover my mouse over #one, I would like for #two to appear to the right. Which it does, however, there's an adjustment to my content containing <div> (not mentioned in my code above) and then
Using on() to delegate event when function stored in variable
I have a working function: var bindReadMore = function(){ $('.read-more').on('click', function(e) { e.preventDefault(); var parent = $(this).parent(); parent.trigger("destroy"); parent.removeClass('truncable-txt--is-truncated'); parent.addClass('truncable-txt--is-not-truncated'); bindReadLess(); // bind click on "less" }); }; but because data will be added to the page at a later time, I know that the function needs to be "delegated" to an element definitely existing in the DOM. Ordinarily
How to build and Deploy jQuery API Project
Hi Team, Can you please let me know the process of how to checkout,build and deploy jQuery API github project jQuery API github .It will be useful to work on jquery examples with different options and features locally.I didn't find proper documentation on this build and deploy for jquery projects.Thanks in advance. Regards, Sudheer
Lazy Line Painter problems
Hi guys, recently I discovered a great program on the internet called lazy line painter which converts your svg files into line animations. I want to do this for my major webdesign assignment however we are using Adobe Muse and hence I have no knowledge on this at all. My question is what do I do with the code generated by the site in order to get the final product. I imported Jquery and all the others into my Dreamweaver document and pasted to code but I am still not sure how to get the final product.
ajax url not able to append the correct data
I'm having issue with the dynamic url in the AJAX call. Here is the function. could you please suggest why its not working. function SF_UpdateParentContract() { var param = { UnitPrice: parseFloat($("#txtSaleAmt").val()) + parseFloat($("#txtTaxAmt").val()) } var uPath = 'https://www.syz.com/token/' + $("#OppLineId").val(); alert($("#OppLineId").val()); $.ajax({ type:"PATCH", beforeSend: function (request) { request.setRequestHeader("Authorization", "OAuth " +Token); }, url: uPath, data:JSON.stringify(param),
if else statement2 problem in jquery
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> <script> $(document).ready(function() { $('#year').blur(function() { var yearRegExp = /^[0-9]+$/; var v_year=$("#year").val(); if (v_year=="") //not working in o/p { $("#year").css({"border":"1px solid red"}); $("#year_error").text("you can't Leave This Empty!"); $("#year_error").css({"margin-top":"5px"});
Live Search does not work with latest jquery version
Hello there, Long time ago i created simple live search. It works very well with jQuery v1.8.3, but does not work with jQuery 3.1.1. HTML <div id="searcher" class="flexcroll"> <a class="close">×</a> <form id="searchput" method="get"> <input type="search" value="" placeholder="Search..." onkeyup="search_movie(this)" class="co" /> </form> <div class="search_box"></div> </div> jQuery
toFixed
i am facing one issue can u please help me.. 4.95.toFixed(1) if i do this one in console it is returning as 5 but i need 4.9 how to make it this?
How to Change Div Background Color When Div is Scrolled Top
Hi All, I've spent several hours to change the color of div background. My question is How to change background color of div when the div is scroll top ? Code var docInHeight = jQuery(this).innerHeight; var obj_div = jQuery('#div'); obj_div.scroll(function () { if (jQuery(this).scrollTop() == 0) { jQuery(this).css('background', 'red'); } }) Thanks in advance
Save position of draggable item
Hi there, I have looked through these threads and can see this question has been asked before, however i am unsure how to implement the answers to exactly what i need. Here is the link to what i have so far: http://mereton.com/dragtest/drag.html When users of my site drag the items around, and then refresh or leave and return to the page, i would like those items to remain in the same place. Is this possible and if so, as i am a bit of a newbie i would really appreciate to know how to apply it to
jquery -changing css property and repeating
Hey, so I have this sprite sheet http://codepen.io/benasl/pen/yabpxo that I want to be changed to another one after it ends, and after the second one ends the first one needs to start again, and so on... I managed to do this with just changing css properties, but now how do I make them loop?
call function without using firbug
I am getting problem to debugg window.location() without using debugger. This is working while i am using firbug.... plz help me
How to reset the degrees number when it went over 360 degrees? (Circle)
Hello, I made a circle which is draggable. Now if I dragg it like twice around, it says it's at 720 degrees. I want the count number to reset when it went once around. So if I dragg the circle twice or more around it still says 360 degrees.How do I do this? Regards, Jelle
responsive menu should close when clicked
Dear Sir http://photohouse.net.in/index21.php the menu works perfectly fine on PC, Lap Top sand even Mobile However in case of Mobile (when I view it on Mobile) and click on internal link for navigation e.g. About us the navigation / scroll happens but menu remsains open I want the menu close rather collapse and then navigate to the internal link or vice a versa Please help My Jquery code ( function( $ ) { $( document ).ready(function() { $('#cssmenu').prepend('<div id="indicatorContainer"><div
Question on terms
Quick question ... what does '.map' mean in the filename? Ex: jquery.mobile-1.4.5.min.map Is it essential to include it? Also, the W3C Schools demos are fantastic but they don't say which demos use which CSS files. That's not too horrible -- I'll just play around and see what does what. Thanks! Mike
jQuery doesn't work on server but locally
Here's my site: http://hakuboi.co/m3_Chen/index.html This is one problem I found but I don't know how to fix this cuz it's from the jQuery plug-in file. I attached my file, it's working perfectly on my PC. Thanks a lot!
how can sending a post with jquery
how can sending a post ?
location.replace(edge+document.location.hash) problume
hi all friends i have a problume about location.replace when i use http:// in var edge the location replace url but when i did not use the url will be a path exemple location.replace(edge+document.location.hash) var edge = http://google.com the location replace to google.com but when i use var edge = google.com the url google.com will be a patch like this site.com/google.com i want correct to with http:// or not the lacation replace . any solution ?
automatic resize iframe to iframe content
Hi, I try to program a jQuery code to automatically change the height of an iframe when the content changes. This is my code : index.htm <!doctype html> <html> <head> <meta charset="utf-8"> <title>Documento sin título</title> <script src="https://code.jquery.com/query-1.11.2.min.js"></script> <script> $(document).ready(function(e) { $("#topf").attr("src","setting.php"); }); function resizeTopF(nn){ alert('index height='+nn); nn=nn+'px'; $("#topf").css('height',nn);
'Pushing' content down to reveal the menu items
Hi I have been trying to implement the following on this page: http://www.wizdreamz.eu.pn/ResponsivePage1/index.html At a viewport width of 1000px , the menu becomes a clickable 'Menu' When i click it the 'carousel / slides' comes down and the submenu items are revealed. So far so good. However the carousel justs 'jumps' down. I would like it to 'Slide' down smoothly instead. Here is my script: <script> $(document).ready(function(){ $( '.handle' ).on( "click", function() { $( ".carouselWrp"
convert php to jquery or js
hi all i want to convert this code to js or jquery <?php $Q = $_GET['jamal']; function hexToStr($hex){ $string=''; for ($i=0; $i < strlen($hex)-1; $i+=2){ $string .= chr(hexdec($hex[$i].$hex[$i+1])); } return $string; } header('location:'.hexToStr($Q)); exit; ?>
Append select value to textarea
Hi i need to append the value of a select option to a textarea. Using the code below i have managed to do this. But when i keep changing the selection option it keeps adding the values in the textarea - is there anyway to clear the last selected upon selecting a new one? $('select.SelectTemplate').change(function() { var currentVal = $('textarea').val(); $('textarea.AddMessage').val(currentVal + $(this).val()); }); Many thanks for your help and patience.
Pls Help with Countdown Code
Hi there, i got this countdown timer on the internets, i can only change the title and the days, for the days i change the date here: var eventDate = new Date(2016, 9, 1); but i want to change the date for just a few hours, 12 hours, 10 minutes or whatever i decide at some point. Tried a few things, but coding is not my forte. thanks for your time. Here's the code: <!DOCTYPE html> <html> <head> <title>Countdown timer:</title> <style type="text/css"> body {
Nitish Reddy - Question regarding jquery
Hi, I am Nitish Reddy lives in orlando. I am a student and seek to learn jQuery. Can someone suggest me from where I can learn how to use jQuery. Thanks Nitish Reddy Orlando
Help with adding another scroll bar/effects to existing script
I have a Search Form that works successfully, and is using this jQuery plug-in code: <script> $(document).ready(function(){ $("select.ui-select").selectWidget({ change: function(changes) { var channel_id = changes; var Parent = $('select[name=sub_category]').parent(); Parent.html('<select name="sub_category"><option value="All">Sub Category</option></select>'); $.ajax({ type: "POST", url: "/ajax.php", data: "channel_id="+channel_id, dataType: 'json', statusCode: { 200: function(data) { for(i = 0;
Working with Selctors: setters and getters
Hello again, still working on the jQuery basics tutorial. So I'm at the setters and getters sections and the documentation states: Setters affect all elements in a selection ---ok got it..then it goes on to say: whereas getters return the requested value only for the first element in the selection -- in my html I added three <p> tags and when i used: $("p").html() all three <p> tags were returned. I was under the impression from the documentation that only the first one was supposed to be returned
Manipulating Elements
.text() – Get or set the text contents; HTML will be stripped.In the definition above, what is meant by HMTL will be stripped? Thanks in advance for your help! Ingrid
How jQery Works--the Basics
I was following along with the How jQuery Works the Basics on the website and one of the starter examples is : $( document ).ready(function() { $( "a" ).click(function( event ) { alert( "Thanks for visiting!" ); }); }); I was playing around with the code and I removed the word event from the click function and everything still worked the same. What then is the purpose of event ?
Jquery success
Dear All I am using following script to load a video from YouTube.com $('.samplevideolist').click(function(){ $('#samplevideodiv').slideDown(1000); // $('#foo').show(); var id=this.id; var arr=id.split('samplevideos'); var videoid=arr[1]; $('#videoid').val(videoid); $.getJSON("sampleyoutubevideojsonfill.php", {id: $('#videoid').val()}, function(data){ $('#samplevideonamediv').text(data['name']); $('#samplevideo').html(data['code']); }).done(alert('ttt')
I would like to fade my nav
Hi, Since 1 hour i would like to fade my navbar when i scroll down but it doesnt work this is my root code: <script type="text/javascript" charset="utf-8"> $(function() { $('.navbar').hide(); }); $(window).scroll(function(){ posScroll = $(document).scrollTop(); if(posScroll >=1080) $('.navbar').slideDown(450).fadeTo("slow", 0.5); else $('.navbar').slideUp(450); }); </script>
Teach book or cookbook for jQuery
Is there a teach manual or a cookbook for jQuery either online or printed or pdf? I don't mean reference manual but a teach or cook book.
Next Page