Replace effect
Hello all I have developed a website using some effects (fadeIn, fadeOut, slideUp ...) which works fine, but now I see that those transitions are very slow in the iphone. As everything else works fine, I would like to exchange those effects for hide and show during runtime and keeping the callback functions... is there an easy way to do it? example: //ORIGINAL $('#clickme').click(function() { $('#book').slideUp('slow', function() { // Animation complete.
Deal with IE5 old browsers how?
Hello I have some users that are reporting problems with IE 5 (maybe IE5+) when accessing my page (yes I suggest them to upgrade or get firefox) ... any way.. The problem is that when they access the page, they get some error messages from the JQuery script, and after some "ok" they get the actual page, the problem is that when they change the page all errors come back. is there any way to prevent jQuery to be loaded/exectuted if IE5 is detected?? I try the <!-- [IF IE 6 ...and the problem
3 blind ddls... or am I the farmer's wife?
Hi I have three cascaded drop down lists. Lets call them: ddlIllnessType, ddlIllnessSubType and ddlInfectiousAgent Initially, only ddlIllnessType is showing. On change, ddlIllnessSubType is filled with json data and made visible. So far, so good. Famous last words... Next, when the user selects a value from ddlIllnessSubType, a similar procedure runs for ddlInfectiousAgent in the ddlIllnessSutType change event handler. However, in the following code, $(this).val() always comes up as 'undefined',
div overlap
Hi guys, I have the follow page: <!DOCTYPE html> <html> <head> <script src="http://code.jquery.com/jquery-latest.js"></script> </head> <body> <div id="id1"> <a href="#" id="button">Click</a> <div id="id1intern" style="display:none"> <a href="#"><img name="test" id="test" src="test.jpg" alt="test"/></a> </div> </div> <div id="id2" style="position:absolute"> <a href="#"><img name="test2" id="test2" src="test.gif" alt="test"/></a> </div> </body> <script type="text/javascript">
keyup problem in 1.4
The following is a function I bind to certain input fields to create an auto complete, as described in the Learning jQuery book from PACT. It's the same function, only wrapped so I can bind it to whatever input field I want function autoCompleteFunction(tagInQuestion, ajaxFile) { var $autocomplete = $('<ul class="autocomplete"></ul>').hide().insertAfter('#' + tagInQuestion); var selectedItem = null; var setSelectedItem = function(item) { selectedItem = item; if (selectedItem
javascript memory leaks
i am doing something like this //dom <div id='parent'> </div> //js var _doSomeThing=function() { //some codes } $(function(){ //appending div and binding methods to span $('#parent).append('<span>1</span>'); $('#parent).append('<span>2</span>'); $('#parent span').bind('click',_doSomeThing); }); function _clearDiv() { //clear div $('#parent).html(''); } //sometime in future, call clear div _clearDiv(); now my question is, binding events to dom and later
how do i control a flash object and makeing him play?
hallo everyone i have a flash object on the screen but it dosnt have an id or name so i just got it like this: $("#containerdiv").find("obejct") then i tried javascript flash function like Play() or Stop() but it pops up a warning that its not a function... i also tried $("#containerdiv").find("embed") but that also didnt work.. it finds the object themselves but the .Play() or .Stop() dosnt work.. those anyone knows how i can do this? thanks!
FireQuery deserves your love
Hi there, I've just updated FireQuery to v0.6 which fully supports jQuery 1.4+ http://firequery.binaryage.com It is no more experimental. I believe this version deserves to be posted somewhere on jQuery.com site :) hey John, are you listening? What about adding "Tools" section to the site and link me from there anyway keep rocking! Antonin
asp.net 'compound' control selectors
I have a page that has several embedded usercontrols with a popup reorderlist. Like -page -usrcontrol1 -usrcontrol2 -usrcontrol3 -usr-popup-control -usr-reorderlist-control ------------------------------------- each 'row' in the usr-reorderlist looks like this <div id="ctl00_cntMn_IWizard_wzImport_ucSched_RoPopUp_ucRoFileList_rolFilesList__rli1_rowdata"style="width:550px; float:left"><div id="ctl00_cntMn_IWd_wzImport_ucSched_RoPopUp_ucRoFileList_rolFilesList__rli1_dvOrdinal"
removeClass() doens't work
Hi, I've made a very small jQuery script for a website Demo where one will click on a button in the top navigation. As you can see the first anchor has a class called "active", this is added with the jquery. So my goal is when a visitor clicks on another link the class on the "previous" button should be removed and added to the actual button. This kinda works, but directly, see, the "new' active button receives the class active but the class isn't removed from the old one, strange thing is that the
JQuery can't populate a combo box
Please check my code, I can't seem to get it work... <html> <head> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> $(document).ready(function(){ var options = ''; var keyExempts = [ 33,34,35,36,37,38,39,40 ]; rankingOptions = { populate: function(census){ var combos = $("select.entryRank"); var selectedComboValues = new Array(); for(var i=0; i<combos.length; i++){ // get all combo box values var data = $(combos[i]).val(); if(data!=""){ selectedComboValues.push(data);
select by ID sometimes works, sometimes doesn't
I'm pretty new at this - been using JQuery about three weeks full-time with good success. But... Some of the elements in my HTML can be selected by their ID's, using the $("#some-id") syntax, and some can't (the selector returns an empty set). In the debugger (Visual Studio) at a break point in the Javascript, I copy the ID value directly out of the html into the immediate window and run something like to print out the length property of the wrapped set: ?$("#unfindable").length and get zero.
how to parse links and then create a unique target attribute
hi, i'm trying to parse my anchor tags, by getting all the href attribute available in the page, and then i will loop through this attribute values and then parse it. if each href value is equal to "mypage.com", the link will open to the same window, but if not it will open to a new window, more like the concept of determining internal and external links in a page. i would really appreciate any ideas, thank you for your help.
Firebug/JSON problems using jQuery 1.4
Hi folks, Tore some hair out over this one... When I upgraded to jQuery 1.4 I started getting JSON parse errors. I know 1.4 requires valid JSON, so I cut-and-pasted the JSON server response out of Firebug into JSONLint and jQuery.parseJSON() and both said my JSON was valid. Finally, I dumped ajaxError.thrownError to the console, and saw this: InvalidJSON:{"SUCCESS":true,"ATTACHMENT_FILENAME":"F6A0D547-1D09-C43B-40F8CCF1E0D2C822","MESSAGE":"Success","ATTACHMENT_ORIGINAL_FILENAME":"something.txt"}
Finding ID's and Checked status of checkboxes
Hi, I have a form which I populated with checkboxes having ID based on the records pulled from a table. eg: Table contains: ID, Name 30, Some thing 64, Some one 28, Some where 70, Some how By means of pulling info from the table, the eventual form will be: <form> <input type='checkbox' id='30' / >Some thing <input type='checkbox' id='64' / >Some one <input type='checkbox' id='28' / >Some where <input type='checkbox' id='70' / >Some how <input type='button' onclick='getcheckboxinfo()' /> </form> Note:
how do i get the first line offset of inline elements with multiple line?
Hello, I need some help for getting first line coordinates of multiple line inline element. Example HTML aaa bbb ccc ddd <span id="target">eee fff ggg hhh iii jjj</span>kkk lll mmm nnn ooo ppp qqq $(document).ready(function() { $(#target).click(function(){ alert($(this).offset().left); }); }); Assume that span#target has a line break, when I see a browser. Then I click span#target, above function returns the head of coordinates which second line ("hhh") has. I want
Need help randomizing div positioning
What I am trying to do is randomize the position of a div that slides in from the left when you hover over an image. Here is the script I am working with courtesy of Build Internet $('.boxgrid1.captionfull').hover(function(){ $(".cover", this).stop().animate({right:'30%'},{queue:false,duration:300}); }, function() { $(".cover", this).stop().animate({right:'100%'},{queue:false,duration:300}); });Here is the css
Can't select all 'li' elements without one who's have class
There is simple html like this: <ul id="icons"> <li class="icon1 hoverNow"><img src="some/pic1.jpg"/></li> <li class="icon2"><img src="some/pic2.jpg"/></li> <li class="icon3"><img src="some/pic3.jpg"/></li> <li class="icon4"><img src="some/pic4.jpg"/></li> </ul> where class 'hoverNow' means, that opacity of the image is 1.0, while others 0.5. This done with css. i want to do, that when mouse hover the 'li' element, image, IF it's not in the li element, who's having class 'hoverNow', become with opacity
How to know what my ajax script is doing?
Hi, the title of my post might be a little confusing but I'll try to explain what I'm trying to do. I'm using the forms plugin to submit a form with ajax, the server side php script does something like this (using php): <?php $object->function1(); $object->function2(); $object->function3(); $object->function4(); $object->function5(); ?> Everything works fine but my question is, is there any way I can know what function is currently executing? I'd like to display
how to get a php-builded HTML string, in a Javascript variable, from AJAX request ?
Hello, What I need to get is something like this : <script>var my_var = "<p>Hello</p>"; But I need this content to be builded in PHP, from an external file. So I tried this : var my_var = $.ajax({ type: "POST", url: "<?php echo $config["root_url"]; ?>/www/ajax_queries.php", data: "action=build_form_for_inscription_CN&event_id=" + event_id, }).responseText;In my ajax_queries.php
Set color on hover
Hello! I'm using jquery to alter the opacity of images. I also want to give them a different color on mouse hover. I tried giving the div class containing the images a background and thought the color would show through the opacity but it doesn't. The code I'm using is <script type="text/javascript"> $(function() { // OPACITY OF BUTTON SET TO 50% $(".jquery_img").css("opacity","1.0"); // ON MOUSE OVER $(".navigation li,.jquery_img").hover(function () { // SET OPACITY TO 50% $(this).stop().animate({
Memory leak while using jquery and ezpztool tip
Below is my code which refreshes every 10 seconds <script> function refreshMe() { var divId = 'myDiv'; var url = 'url'; jQuery.post(url, function(data) { if (document.getElementById(divId) != null) { document.getElementById(divId).innerHTML = data; } jQuery(".liveAuthen-target").ezpz_tooltip({ contentPosition: 'rightStatic', stayOnContent: true, offset: 0
Show server side process on the client using ajax
Hi, My login to the site is being processed using ajax, which does a redirect to the members page upon succesfull loggin in. The login feature however can in fact take a while because we need to initialise quite some data when a user logs in (his details, but also his privileges are loaded, his personal menu based on these privileges are being loaded, we are loading shopping cart info, we are initialising personalisation settings, and a whole lot more. It sounds like a big thing, but it isn't, and
Animated Slideshow
Hello! I am new to jQuery, so I am not completely aware of what it can or cannot do. Do you think it would be possible to make a jQuery slideshow like the one in http://www.absolut.com/? My question is about the paper effect and the reflection when you change the image. Thank you for reading and any help would be appreciated :)
tabs with expandable content using a "read more" link
I'm trying to emulate a technique I've seen on many web sites, but I'm a bit lost. I would like to have a series of horizontal tabs that load content in a div. Once the content is loaded the user would have the option to select a "read more" button and the rest of the content would appear. At that point they would have a button labeled "collapse" to return to the original state. I read on a forum that there are many ways to do this, but there might be an easy way to do it using jQuery. I've
Jquery unbind('keydown') not working properly
Good morning I have a slight problem in FF3.5 that unbind('keydown'); is not working properly.. $("#q").unbind('keydown'); $("#q").keydown(function(e){ var code = (e.keyCode ? e.keyCode : e.which); if(code==40 || code==38) { var totalResults=$("#quick-search-results li"); var selectedResults=$("#quick-search-results li.qs-selected"); if(code==40) { var nodeIndex=($("#quick-search-results li.qs-selected").length<=0) ? 0 : $("#quick-search-results").index('li.qs-selected');
How do I set up a custom queue
I was reading about delay() in the API ref and it mentioned it used the standard effects queue or a custom queue, but didn't illustrate how you set up a custom queue. Could some please give me a simple example. tks
reload/refresh page after resize
Hi, can anyone help. I've looked around for a solution to this and can't seem to find anything that works. But basically what i want to do is after the user resizes their browser the page refreshes. I currently have this: $(window).bind("resize", resizeWindow); function resizeWindow( e ) { }; Thanks in advance for any help. Ben
Problem with back button / Hiding
I start of by mousing over one of the homepage image buttons, the opacity changes and a descriptor shows up to the top right. I click on that page . So far so good. But when I hit the back button on the browser, the image is still faded, and the text is still there... How do I make it so going back "resets" the page. Hope that makes sense here is the beta link.. http://dph.begincreative.com/index.php
accessing dynamically created class problem
Hi, i have input elements with a class "c10_3" created by this code: $('#myTable :not(:first)TR').each(function() { $(this).append('<td align="center"> <input class="c10_3" type="checkbox" /> </td>'); }); but now i can't access it with: $("input[class='aaa']").click(function() { alert('hi'); }); what i'm doing wrong? thanks in advance!
queuing animations in an each() function?
Hi people, I'm currently trying to display an animation of sectors within a main div "filling up" on at a time from bottom to top. <div style="width: 50px; height: 300px;" id="top"> <div class="sec" style="height: 20%; display: block;"></div> <div class="sec" style="height: 10%; display: block;"></div> <div class="sec" style="height: 30%; display: block;"></div> <div class="sec" style="height: 40%; display: block;"></div> </div> these divs will be dynamically
[jQuery] How do I reset to the original positions of a sortable list? (using the .sortable() method)
Hey all, I'm using this sortable method: http://docs.jquery.com/UI/Sortables/sortable Works perfect! I have one question though: When a certain action is taken by the user, I want to reset the original order of the <li>s in the list. I can't seem to figure out how to do that. Does anyone have any tips? Thanks!
Selector for all elements that are not type=text or type=textarea
I need to add an event for all elements that are not text entry. I have tried this $(':not(input:text, input:textarea)') $(':not(:text, :textarea)') I tried to get it to work for just not type=text $(':not(:text)') $(':not(input:text)') I can't seem to figure it out. Anyone have any suggestions?
Can't understand this... Want to make a image appear on active link
Hi everyone! I started using jQuery yesterday so im a noob. I have a navigation bar, and i want it to display a background image on the active menu item. (Like the top most menu on this website, it has a little blue underline) So i got this function: function displayBgImg() { for (var i=0; i<$("ul#nav_prim a").length; i++) { if ($("ul#nav_prim a")[i].href == document.URL) { $("ul#nav_prim a")[i].css("background-image", "url(images/nav_bg.gif)");
Problem with IE7 and 6
I have a script on my site for a simple animation. It works fine in Safari, Chrome, Firefox, and IE8, but in IE6 and 7 it gives an error and completely messes up my page. Here is the script: function slideOff(link,horDist,speed) { $(link).animate({ 'left':'+='+horDist, 'opacity':'0', },speed) .animate({ 'left':'-='+horDist+'px' },0) .animate({ 'opacity':'1' }) } If you'd like to see the page at a whole it is at joeldrotleff.com. I commented out the script for now, so that my site wouldn't get broken
Jquery displays a message in IE and Firefox
Cordial Greetings ... I need your help Someone might answer as I do to get the message I despligue IE or Firefox ".. a script is taking longer to run, want to stop or continue .. "(something like). this happens when I drive a system of more than 15000 rows around .. I am using this js NEXT jquery.tablesorter.js this link in http://tablesorter.com/docs from and thanks for your help
How can you manipulate the data returned by the .ajax method ?
Hello, I'm currently working on a form where an entire HTML page is returned via the .ajax method. I would like to display only the content of the div with the id "content" (of the page returned) in the div with the id "result" (in the calling page). Here is my current script : $(document).ready(function(){ $("#form").click(function(){ $.ajax({ type: "POST", url: "enregistrement/", data: "mail="+$("#mail").val()+"&numero="+$("#numero").val(), success: function(msg){ var
hasClass for gaining a class?
Hi, I'm trying to detect whether an element has a class, but I want it to be continually detected. So far I've tried: $(document).ready(function() { if ($('#myID').hasClass('myClass')) {alert('Now!');} }); However, this only checks once - when the page is loaded - which will always return false because the class is only added afterwards. I've also tried taking it out of the document.ready, which doesn't work either. I feel like the hasClass function should allow for followup, so it would
How do I pick the current selector from Multiple Options, e.g. $("#div1, #div2, #div3, #div4).click(function(){ //Get the Current Selected Picked });
$("#div1, #div2, #div3, #div4).click(function(){ //Get the Current Selected Picked //I Would like to get if the item clicked was the Div1 or Div 2 or Div 3 so I can make changes in the selector chosen }); How do I do that? It's really simple but I tried $(this) but does not work, if someone has a solution for this.. Thanks!
Getting the value of a custom attribute
Hi, I'm using the jquery in place editor, and I need to get the value of a custom attribute in order to send it with the form. The jquery i have is as folder... (the bit i'm having trouble with is highlighted) $(".edit").editInPlace({ url: "./server.php", params: "folder=" + $(this).attr('folder') //show_buttons: true //$('.edit').attr('folder') });and the html is as follows: <span class="edit" folder="folderName">text to edit</span>As you can see, i need to get jquery to get
Next Page