Screen Invalidation
My question is in regard to the order in which my javascript is executing. I have a rather lengthy function which is pulling data from a server via $Ajax. The first line of this function calls another function which is supposed to show a full page and partially transparent DIV. The idea is that I put this DIV up to gray out the screen, which lets the user know some work is being done for a few seconds while the function is running. At the end of the function the DIV is made invisible again. That
Ajax url parameters as a variable. How?
Is there a way to set a ajax url with a variable? function ajaxDialog() { $.ajax({ url: url, type: "POST", DataType: "html" }); } Thanks in advance! Guilherme Longo
Javascript does not work on my page
Hey guys, I'm having a problem with my javascript. I have it put at the very end of the body tag like so... echo '<script language="text/javascript"> $(document).ready(function() { $(window).scroll(function(event) { var top = 0; var y = $(this).scrollTop(); if (y >= top) { $("#byos-menu").addClass("byos-fixed"); } else { $("#byos-menu").removeClass("byos-fixed"); } }); }); </script>'; echo '</body></html>'; I've put alerts in the js
jQuery.parseJSON of an array not working
Six Months ago I started another thread about json_encoded arrays, because I was having trouble grabbing data. That thread did give me some solutions, and until just a couple days ago I had no problems. However, now I am having problems with characters like slashes and commas. Following are the details: Php script encoding the array echo "<td class='e'><input type='checkbox' class='Record_Chk' value='". json_encode($row_array) ."'></td>";jQuery Script $('.Record_Chk').click(function() {
finding text in any div
How can I set color of jack as red? I have to use .find() API ` <div>linda</div> <div>jack</div> <div>george</div>`
Ignoring child element while triggering parent
I faced interesting problem. I'm using jquery mobile for my project, and i have footer with navbar inside. I wrote script to toggle it when i click/tap on it. But tap/click executes when i click on any element inside navbar, that is inside footer. I tried to use stopPropagation, but that disabled ajax page loading aswell. Is there any ways to ignore element only for certain script? Here is example of my code: <div data-role="footer" data-id="main_footer" data-position="fixed" data-fullscreen="true"
How can I achieve smoother animations?
I'm using jQuery animate function to animate the left property of a div with a lot of elements inside of it, for some reason in Firefox the animation is laggy.. There is a solution for that?
Good practice - more data vs. more computation
Hi guys, This question has been bugging me for a while now. In terms of good practice and standards, which is the preferred method: 1.) Send a small amount of data and have the client(jQuery) compute the final result. VS. 2.) Compute the data once on the server and send a large amount of data to the client. Thank you for your input! Any information helps!
IE 7 and .append()
i am appending some html like below in my jquery orderDetails = ''; orderDetails += '<tr valign="center" id="tr' + MenuId + '">'; //orderDetails += '<td width="40%" class="cartHeaderRow">' + "<input id='txtHidMenId' type='hidden' value='" + MenuId + "' />" + jQuery.trim($(".name", row).text()) + '</td>'; orderDetails += '<td class="cartHeaderRow" style="word-wrap: break-all;width:155px;"><div style="width:120px;word-wrap: break-word;">' + jQuery.trim($(".name",
Auto Complete highlight the typed characters
Dear All I am using autocomplete / suggestion It works great however it has facility to hightligh the characters in bigining example if a person typing ion and in database table we have word rationing Word rationing is being display properly (word ion is in middle of string) How can i highligh the selection part in short word rationing I want to be displayed as rationing highlinght the word typed by user pls help What had tried <?php $string = "Rationing is compulsory....."; $foo="<span class=\'scrolltableheading\'>foo</span>";
Adding jquery to the index.php
Hello guys'n'girls, i'm currently working on a gallery for myself and learning a lot about jquery. Today i got stuck at one point and i hope you guys can help me out. The thing is that i wanted to automatically create a mousebutton listener for a gallery overview i have. Let me explain this with a little more depth. I'm having a script which scans a folder for subfolders and copys those subfolder names into an array. Those subfolder are my different themed galleries. In every subfolder are pictures
Problem with images, binding load events and http codes
Hello all. I have some problems with an ajax call that should be quite simple and now I'm completely lost, so any help would be great. Ok, let's go: I have a web page working at this moment, ok, and I use $.get() to load a table into it (html format), this is working ok too. When user clicks in <tr> tags, I use $.get() another time to get some more html data, including an image as an <img src=". . .">. the server send me the image only if a user loaded it previously from an external 'admin site',
Nice BMW X1 site! How did they do it?
Check this out: http://www.bmw.com.cn/cn/en/newvehicles/x/x1/2012/showroom/highlights/index.html#id=phase_exterieur I didn't know jQuery can make such complex animation. How did they: 1 Merge cut images to be one image 2 Make the flying birds animation 3 Mouse wheel control 4 Interior & Exterior switch (click the arrow button at the right bottom cornor) Any idea?
Android Touch and Hold
I have a wallpaper that I'm making available for download on a Sony Tablet S. Android 4.0.3. The goal is to allow the user to tap and hold, a pop up comes up that allows the user to save the image to their device. The html and css are created with jquery appends. This is working on the iPad, but not on the Sony. This didn't help: -webkit-touch-callout: default or inherit. I have the following: -moz-user-select: none; -khtml-user-select: none; -webkit-text-size-adjust:none -webkit-user-select:
toggle checkboxes in a table after click function
I need this function to work after the page is loaded. The error is a missing ; before statement error on the true line. Also when the checkbox toggle-all is clicked as "checked" I want it to mark the class in the table checkall checked as true and when toggle-all checkbox is clicked again, mark all checked boxes in the table false. It seems almost right but some error with the brackets. $(document).ready(function() { $('#toggle-all, input:checkbox').click( function () { $('#table,
Show list contents on hover.
I need to make list content show up on hover. The content for every different list should appear in the same place and no content should show when not on hover. I'm trying to avoid writing different jquery code for each list category. Any ideas?
Execute 2nd Jquery only after completion of prior Jquery
Dear All I want to Execute 2nd Jquery only after completion of prior Jquery in 1st JQUERY i.e. $('#selectheaderdiv').load(prog); I am upodating the required table and I want to exeute 2nd JQUERY i.e. $('#selectheaderdiv').load(prog); // 2nd task only after completing execution of 1st one i,e $('#selectheaderdiv').load(prog); // 1st task Pls help At present JQUERY given below 2nd JQUERY gets executed even before 1st one $("#addheader").click(function () { var keyword=$('#keyword').val();
datetime picker with prev and next year changer
hi i want to use http://jqueryui.com/datepicker/#icon-trigger calendar contorl but there is no year change if i set changeyear :true it will bring drop down i want year changer same as month changer with next and previous please help.
How to set delay time in this code?
Hello everyone, I am new here. Please be patient with me. I have this code from this link http://www.kriesi.at/archives/create-a-multilevel-dropdown-menu-with-css-and-improve-it-via-jquery function mainmenu(){ $(" #nav ul ").css({display: "none"}); // Opera Fix $(" #nav li").hover(function(){ $(this).find('ul:first').css({visibility: "visible",display: "none"}).show(400); },function(){ $(this).find('ul:first').css({visibility: "hidden"});
Animation on bottom of page
... Im trying to do this stuff just for fun on page. And i have occurred a problem. Thing is, i want to have a little part of human head on bottom of page and when you hover it, it slides up. But not with slide up, but with animate... (Slideup looks really bad with pictures). This is actually working, but thing is, i dont know how t css it :D I have just image in div on bottom of page like this: .redneckClass{ position: absolute; left: 45%; bottom: -500px; overflow: inherit; } #redneck{ position:
are functions in functions not allowed in widgets? What's happening here?
In an Autocomplete select: option function, I define a variable as a function. The variable does not execute this function. It completely skips it. I get no error in the Console, but when I follow execution line by line. I get the following at that line, which I don't understand. citiesWithBoroughs: function (request, response){ get arguments: function ThrowTypeError() { [native code] } get caller: function ThrowTypeError() { [native code] } length: 2 name: "" prototype: Object set arguments: function
IE ok but problems with Chrome
Hi, I am having trouble with Chrome runing my first jQuery+ajax code, IE is working fine. My script retrieves a web service via SOAP XML. I tried CORS=true but Chrome keeps reporting: Origin (ip address) is not allowed by Access-Control-Allow-Origin. I am testing my code indoors but final destination will be an Android device. Page is loaded from standart 80 port, web service is called on the 8181 port. I am using IE ver 9.0.8112.16421, Chrome ver 22.0.1229.94 m, running on Windows 7. This is a portion
Bind Blur to Dynamic Form Fields
I have an order form that had lots of input boxes so I wrote a little function to validate them on blur. It looks at all the input's with the input class and assigns blur to them. Problem the user can add up to 75 more inputs and I'm trying to think of a way to do this the easiest. Can I call my function below again after each new row of inputs is created to add the blur function to the newly created form items or will it screw things up. What's the best way for me to do this. I'd like to just
Appending stylesheet with jQuery
Hi, i used to append stylesheets with query 1.4.2. Example: if (!$('head link[href*="jquery.fancybox"]').length) $("head").append('<link rel="stylesheet" type="text/css" href="../_content/layout/default/_shared/js/fancybox/jquery.fancybox-1.3.1.css" />'); ... without problems. After updating query to 1.7.2 that doesn't work with ie8 anymore. I know, that I could help myself with document.createStyleSheet(), but that means more code because it isn't a crossbrowser-solution and I ask myself why the
jQuery in a Windows 8 Metro app
Does jQuery have any plans to make a compatible version with Windows 8 javascript metro apps?
sending long data via jquery ajax
the below codes get html, encode and send it to any php files. php files include just "hello" string. but when function runs it can get all html but cant send cause of string's long. Becase you cant see the HELLO alert. Ajax allows defined longest? Am I right? <script> function getlongdata() { // htmldatas=encodeURIComponent($('#divlongcontent').html()); alert(htmldatas); $.ajax({ type: "GET", url: "sayhello.php", data: "longdatago="+htmldatas, success: function(msg){
Probable conflict
"wt-scroller" hangs when it is clicked. It’s probably a conflict, but these tired eyes can’t see it. Maybe fresh eyes will help. www.janisource.com Clicking on the Youtube videos should result in a popup player. But the popup hangs. What do I need to do to correct this problem? Thanks in advance.
problem with selector
hello i m using jquery to do this: jQuery('tr:has(.filterline) .jquery-selectbox-moreButton').each(function(){ this.hide(); }); and the problem is that hide all on 'tr:has(.filterline) and hide all element that have class .jquery-selectbox-moreButton i want to have only tr:has(.filterline) with child .jquery-selectbox-moreButton to hide element i try something like this : jQuery('tr:has(.filterline) > .jquery-selectbox-moreButton').each(function(){ this.hide(); }); or jQuery('tr:has(.filterline)
jquery returning to previous state
when i click the add image button a new image appears when i click the new image can i revert it back to my previous state using jquery...showing the previous image with add image on hover http://jsfiddle.net/6MmMe/37/ providing my js code below
Dynamically create form elements
I downloaded the code below to allow the user to add another form element if required. It works BUT it places the text from the previous text box into the new one. I want to create an email page where the user can create as many recipents as possible, but this isnt acceptable. How do i modify the code to remove the clone and just create a new form element? Cheers Darryl <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
jquery hover , remove class and add new one
i wanna like, when hover the mouse in div class main, remove the class city and insert city2 on <div class="city">Curitiba - PR</div> but only working with a hover mouse in <div class="city">amsterdan</div>, so remove a class and add new one. i had tried but i have no sucess. $(document).ready(function(){ $('.fundo').hover(function(){ $(this).children('.cidade').removeClass('.cidade').addClass('.cidade2'); }); }); <div class="main" onclick="window.open('http://google.com.br','_blank');"
Get html of the elements in another page is not working!
Hello, I'm trying get the html of an element in another page, but i am having problems. I am using $.get function, look at the code: $.get('page',function(d){$('#derp').html($('body',d).html())}); Are returning null, please i need help. Note: Sorry for my english.
Need a sequential image swap on hover
Hello I need to swap more than one image on mouseover, I need to pass an array of group of images to a javascript function that will swap these images sequentially, not just one image Many Thanks
a is undefined
This one is over my head! I keep getting a sporadic "a is undefined" error from jQuery. I'm sure the culprit is in my code, not jQuery, but Firebug keeps pointing me to the library. Anyway, the issue can be replicated here: http://interactive.mellemallc.com by simply clicking around quickly on the links in the sidebar. Also worth noting, I've commented out virtually every line in my script to find out where the culprit may lie, and I've found that when I comment out the simple line calling the
jQuery 1.8.1 fails with firefox 14 with error "d is undefined"
I am writing a firefox plugin and am intending to use jQuery in it. From the overlay, I am calling my javascript which has the page load listener in it. I am loading jquery once the page load is triggered. //code snippet window.addEventListener("load", function pageLoader(evt){ window.removeEventListener("load", pageLoader, false); var jsLoader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"].getService(Components.interfaces.mozIJSSubScriptLoader); jsLoader.loadSubScript("chrome://content/plugin/jquery-1.8.1.min.js");
table row click
Please could anyone help me urgently. I am having a bit of a hassle. <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>New Page 1</title> </head> <body> //My page only works when clicking on the physical row of the table. // I want it do the same #N(button) is clicked as well to simulate //the same behaviour as the manual click process. <script type="text/javascript"> //These 2 variables will only be set at the bottom of the page var xFactor; var DeleteRow;
Animate web page elements with Scroll
hi , i am new to jquery.i have project new website with scroll animate. any one can help me. i need good tutorial to create this website. i need > if scroll down move some text , move div , zoom in, zoom out. but i don't know tricks. please help me. Thank you.
Why Google Hosted Libraries 1.8.3 already?
Google Hosted Libraries jQuery snippet: <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> site: http://jquery.com/ versions: 1.8.3, 1.8.2, 1.8.1, 1.8.0, 1.7.2, 1.7.1, 1.7.0, 1.6.4, 1.6.3, 1.6.2, 1.6.1, 1.6.0, 1.5.2, 1.5.1, 1.5.0, 1.4.4, 1.4.3, 1.4.2, 1.4.1, 1.4.0, 1.3.2, 1.3.1, 1.3.0, 1.2.6, 1.2.3 note: 1.2.5 and 1.2.4 are not hosted due to their short and unstable lives in the wild.
$.ajax() / same origin policy satisfied.
Hi. I'm suffering from ajax using jquery. I set up all ajax using jquery with jsonp. taking lots of time, I succeeded to get with jsonp from Node.js server i made becuase I need to use another port beside 80. Since it's not possible use POST type at all with jsonp, I rather starting to re-set up for same origin policy. I recreate and clean the environment to use 80 port. However, as I've been trying to send GET or POST to server, it drives me an error every single time. is there anybody can help
jquery $.get switch doesn't work
<ul> <li><a href="http://www.home.fr/">Accueil</a></li> <li><a href="index.html?page=1" >E-books</a></li> <li><a href="index.html?page=2" >Boutique</a></li> <li><a href="index.html?page=3" >Forum</a></li> <li><a href="index.html?page=4" >A propos</a></li> <li><a href="modules/alert.html" >Test</a></li> </ul> <div id="result"> <script type="text/javascript"> var page; $.get("page", function (data){ $('#result').load($.this).attr("href") switch((page){
Next Page