Holding up control until a fadeOut finishes.
I have routine that rolls through the images in an array every iInternalCount seconds, shown below. It first fades out the current image, does the calculation for the next image, assigns the next image to the src attribute of the image slot and then fades in the new image. But after starting the fadeOut of the current image the code continues immediately to the image switch line, so we see a switch to the new image and then the new image fade out. I need a way, probably using the callback function
id and javascript functions
I'm new to jquery, I like it. Probably dumb question: How can I write something like: document.getElementById('id').scrollIntoView(false); with the jquery $ syntax? This won't work: $("#id").scrollIntoView(false); Thanks.
Creating A Tooltip For A Table Cell ?
I have created a function for my table which works when a user mouses over the cell, the function gets the X position of the cursor and then keeps updating it, See below: <table> <tr id="mon_Section"> <td id="day_Title">Monday</td> <td id="mon_Row" onmousemove="movedamouse(event)"></td> </tr> </table>Below is the javascript function: <script type="text/javascript"> var mon_Pos; function movedamouse (event) { mon_Pos = document.getElementById ("mon_Row");
jquery and js-methods
hi, i'me new to jquery and what i didn't got is interaction of jquery und js-methods. my problem: i use the jq-plugin jstree. the code: $(function () { $("#async_json_2").tree({ opened : ['sid0'], ui : { theme_name : "classic" }, callback: { beforedata: function (NODE, TREE_OBJ) {return { parent_id : $(NODE).attr("id") || "NULL" } },... with $(NODE).attr("id") i get the value of the attribute 'id', wich is f.e. "sid0". But what I need is only the integer-part of this value so i need "0" in this case.
Multiple mouseover
Hi I would like to know how I can have multiple functions on the same page. The idea as you will see is to have a pic on top of text and on mouseenter the pic is faded to show the text. I would like to have 4 pics with the same effect on the same page. Here is my code, it works great for one picture but not when I add the other 3: Thank you in advance for your help <script type="text/javascript"> $(function() {$('#one img').mouseenter(function() { $(this).fadeOut(200); }); $('#one').mouseleave(function()
How to prevent partial match
Hi Bit of a noob question, but I'm using the following code to get a menu tab to highlight/switch class automatically based on the id of the page in the querystring. All is working well until the page ids hit double digits. Subsequently a menu with the link "p=10" and above will highlight when "p=1" in the location bar. How should I amend the code to prevent this partial match? The menu item links always end after "p="; there are no further keys in the querystring to act as a delimiter. Any pointers
possible to use a class selector with an embedded (iframe) document
Hi all, Totally new to this... Is it possible to access a class from a "top" document, when the class is present and defined in another document, embedded using iframe? Doesn't seem to work out of the box. I'm trying to embed an image gallery on my page and use it's thumbnail images for a slideshow
compare jquery.each and for...in
Hi all, I'm a newbie and I have a question and need your help, please. When I traverse the follow array, jquery.each and for in, which way has higher efficiency? arr = ['#div1', '#div2', '#div3']; // there may be more than 10 div I'll process each div: text = $(div).text(); $('<input type='submit'..../>').appendTo(div);
POST form to a page
I am new to jQuery, I would like to be able to find an example in ASP where jQuery uses Ajax HTML request to POST a form to a page. I have looked at the following page: http://api.jquery.com/jQuery.post/ I have been unable to find a simple example in ASP when this is implemented. Can anyone provide me with a simple example? Thanks.
jQuery validation & submit to PHP file
I've got something like that: $(function() { $("#form_order").validate({ rules: { fname: { required: true, minlength: 2 }, lname: { required: true, minlength: 2 }, } }); }); And how to send both values to php file if inputs are valid? I've got something like that but I don't know how to connect these two codes to work together. $("form#form_order").submit(function() { var fname = $('#fname').attr('value'); var lname = $('#lname').attr('value'); $.ajax({ type: "POST", url: "ajax.php", data:
Minified and Gzipped
Hi Guys, I'm wishing to shrink my js code much like the the release of jQuery does. Aside from the obvious Gzipping, what steps are taken to reduce code size during the minification? Many thanks
newbie looking for help adding/understanding dynamic form fields
Hello, I'm new to jQuery, and I think I understand the basics but I could use some help understanding the finer points. I'm working on a form using the validator plug-in, and I want to include a section where a user can dynamically add more rows to the form to add additional info, similar to the "jQuery validation plug-in - dynamic forms demo" at http://jquery.bassistance.de/validate/demo/dynamic-totals.html However, I don't want the validation to happen until the user clicks submit at the end of
Newbie question -- gallery multiple hover effects
Hello. Im trying to build a gallery with about 24 thumbnails in it. What happens is that it initially does some fadein animations and then when everything is visible upon hovering on the gallery everything fades out except the one where the pointer is on, in turn mousing out of the gallery area all the thumbnails will fadein to 100% again. This is the code I have for the hover. I cant seem to make only one of them 100% on mouseover. $("#thumbMain").hover(function(){ $(this).stop(true,
Draggable elements parent automatic resize
Hello, I'm pretty new to jQuery and I'm making a page with widgets that can be placed using drag and drop. I am currently using the newest jQuery and jQuery UI. However I have the following problem and maybe someone can help me out. If I this post is misplaced please correct it for me, thank you. I have the following code: $(document).ready(function(){ $(".widget_wrap").draggable({containment: 'parent', drag: function(ui, event){ $("#navigation").text("Item: Left: " + $(this).position().left
Newbie question: Post form to a page.
I am new to jQuery. I have looked at the following page: http://api.jquery.com/jQuery.post/ I would like to implement this so that I could POST elements in a FORM to a page. I have looked for a simple example using ASP, but have been unable to find anything. Can someone provide me with a simple example? Thanks.
Newbie help; getting the text outside of span tag
<span class="uc-price-product uc-price-sell uc-price"><span class="price-prefixes">Price: </span>$34.00</span> My generated HTML is like above. How do I get 34 from above? I tried the following to get $34.00 like this, but not working: alert ($(".uc-price-list").text()); //it is getting inner span along with the $34.00; i just want number part. Thanks for the help.
Unable To Establish A Callback
Below is the distillation of code with which I am having troubles. The code works, but I am sure that there must be a better way of doing things. This simple program displays two boxes. When the user mouses over either box, all boxes are returned to their original state, a zIndex of 2 is applied to it, then the box expands partially over the other box. This works fine. However, I am using setTimeout to coordinate the setting of the zIndex value, which is something that I would think would better
my first jquery action... animating an image then removing it from dom
hi guys, i am animating an image on a path, after this is done i want it to be removed from dom (currently every time a new element is added and finally the browser locks up due... guess - hehe) b1 = $('<img>').attr({'src':images[ Math.floor(Math.random()*3)]}); pointer = $('<div>').append(b1); $(document.body).append(pointer); pointer.css({'position':'absolute'}).animate({path : new DiverBubbles(currentDiver)},2000,
How can i Onmouseover between 2 gridview with jquery
want the 2.gridview row with * coloured when i move the mouse on the first gridview row * Please help me... 1.Gridview: id adı Gorevli1 Gorevli2 ---- ---------- ----------- ------------ 1 Ali 4 9 ************** 2 Veli 10 20 2.Gridview: Gid Gorevli_Adi ----- ---------------- 8 Hasan 4 Hayri **************** 10 Aslan 9 Ayşe *****************
Simple mouseover issue
Hi I am bran new at JQuery and need some assistance with something probably very simple: I would like to display an image and on moueover or mouseenter want to fade the pic completely to show a div with text in it. On mouseleave would like to unfade the pic to now hide the text. Here is what I have so far the mouseenter works but the last part not so much. Any help would be greatly appreciated. I ultimately am planning on having 4 different images and text divs on the same page <html> <head> <style>
How do I get started installing Jquery
Basically I here that these Jquery files are minimized and uncompressed. It tells me is a Jsciptfile and the first file says its minimized and Gziped. I dont understand how this file works and how to get started can somebody help me please. thank you
Target all elements inside div except one...
Hi there, I have this code in a js file: $(document).ready(function(){ $(".accordion p").hide(); $(".accordion div").click(function(){ $(this).next("p").slideToggle("slow") }); });... and this code in my HTML file: <div class="outer"> <div class="article_name"> <h2><a href="#">Should Comment Forms Have More Fields?</a></h2> </div> <div class="article_date"> Feb 11th 2010 </div> <div class="article_category"> Discussion </div> </div> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed
how do I get a script file to loop through multiple sections of an xml file?
I'm working on this project where I'm trying to use jquery to read from an xml file and generate added code to a html index file by creating dropdown select menus and then allowing the user to display pictures according to what of the 2 category 'select' types they select on the dropdown list. The program works as far as generating the select dropdown list but only generates the images for the first selected option. When I select the second drop down category nothing happens it simply shows the pics
How to correctly find elements in DOM using parent()
Hello, I am doing this code that has multiple elements of the same type.... to select the parent DIV I had to use this code: $(this).parent().parent().parent().parent().append($('#grid_show_columns')); How can I do it without using that many parent() ? Thanks, Gabriel
Override or cancel .prepend
Hi, $(document).ready(function() { $('#menu ul ul li').prepend('~ '); }); This chunk of code is in a .js file that is link to every pages of the site I'm working on (called via an include). I linked another .js file to all the pages of a new section I'm developping. Is there a way to override or cancel the .prepend with my section specific .js file?? I tried to use .remove() but I can't make it remove only ~ Thanks, Steve Forest me@steveforest.com
Question about loading a page into a layer
On click of a text link, I have a dealer registration form that appears in a site I am working on. To close the window, I have a close icon in the called page where the idea was that when the visitor clicks on the image, they will close the window. Below is the script I use to call the information: jQuery(document).ready(function(){ jQuery("#dealerInfoForm").click (function () {jQuery("#newsDisplay").load("pages/dealerApplication.php"); jQuery("#newsDisplay").toggle('normal');});
Need Help for image rotate with slider. Please help.
Hi, I am new in Jquery so i dont know much about it. Please answer me very clearly Thanks. Please check this URL for where i am, and what i want. http://www.hkcsy.com/image_test/ slide work but on only one step. not work on others. i want this image rotate right and left with slider. I am attaching file too. please answer. Thanks in advance.
how to display value of input in DIV object in real time
Hello everyone, I'm new in jQuery and have some (maybe idiotic) question. F.e I have div which id is someDiv and input text which id is someInput - and how to do that value of input object will display in DIV in real time? If i type letter "a" in input, it should automatically display in DIV. Which function should I use? I'm the real begginer in jQuery. Thank you in advance.
Hello I would like to add a slide javascript to my website
Hello I am new to Jquery. Actually I dont even know how to install this program. I dont understand how to run this program because its in a js file. How does this work? do I have to decompress this file to get started? I would like to add a sliding menu on my webpage could you help me please thanks Gabe
object comparison
How do I go about comparing two jquery objects to see if they're actually the same html object. I've got: $("...").each(function(){ if($(this) != someobject) { $(this).css("border", "1px solid red"); } }); This should add a border to every object in the selected set except for the one defined in someobject... shouldn't it. What am I doing wrong here?
jQuery.load VS. jQuery.ajax
I hope this is the right forum, newb here. Anyways, I was wondering what practice is better and faster for loading data onto a page. $(document).ready(function() { $("#page").load("something.html"); });- OR - $(document).ready(function() { $.ajax({ url: "something.html", cache: false, success: function(response) { $("#page").html(response); } }); });Is there significant ups/downs to using either one of these? Is one
How to get the data; (ex. id:1) with the jQuery.get?
Sitting here and trying to learn jQuery, that seems to be one great framwork! :) Anyhow, doing a simple .get like this; <p class="data"> Get data </p> <script> $("p.data").click(function () { $.get("test.php", { id: "1" }, function(data){ $("#view").html(data); }); }); </script> <div id="view"></div> ...And now, inte the file test.php I want to fetch the value (1 in this case) to the file test.php... How do I get it, simply? ;) I want to get the value
Error-Event logging
Hey all i wrote sth like this $(window).error(function(msg, url, line){ jQuery.post("jLogging.php", { message: msg, link: url, line: line }); });to send the errors to my php script. it's also mentioned as an example in the jquery api-browser, http://view.jquery.com/trunk/tools/api-browser/#link-error-fn but it doesn't work and i get this error message in FF: Fehler: uncaught exception: [Exception... "Illegal operation on WrappedNative prototype object" nsresult: "0x8057000c
adding and removing classes
Hi! I need to remove class to prevent triggering of click function for elements Have: <script type="text/javascript"> $(document).ready(function() { $('.item1').click(function(){ alert('Hello'); $('#blabla').removeClass('item1').addClass('item2'); }); }); </script> </head> <body> <div class="item1" id="blabla"> ksalj </div> second click on element "blabla" triger again click function. why? thanks in advance
How to install jQuery + Validator and get started?
Hello, I am completely new to jQuery, and was actually looking to implement the validator (http://plugins.jquery.com/project/validate) for a validator on my site with little hassle :P I need one page to have a contact form, and another to validate credit cards (and some customer information). I downloaded the file from the link above, and I don't see any step-by-step installation instructions on how to get started... where do I install jQuery, and how do I configure the Validator? Also, how long
doable with jQuery? if so, how (tutorial?)
hi guys, i try to rework my webpage and i woudl like to have a nice animation on the bottom corner... so, the first part i already got working (divers blowing bubbles) see@ luke2000.lu.funpic.de now i want to add animation to the legs of the divers (moving up and down) therefore i would like to split the divers in three parts the body, the leg, and the fins the body won't move (yet - later it should move around a bit - but the whole diver!) the legt should rotate up and down - the image needs to
A basic hover, hide and show question.
I am super new at web development, but have had a little bit of luck with basic jquery...until now. What I want to do is have text appear in a div tag when the page loads, but as soon as you rollover any one of the 3 links to the left, the initial text should disappear and be replaced with text associated with each of the 3 links. I have the rollovers working so that the associated text appears, but can't figure out how to get the initial text to disappear and reappear on mouseover and on mouseout.
Jquery Scroll.to fullpage
Hi, This is my plan. I want to create a 3x3 grid on the page. Each square needs to be the height and width of the page. I will then use jquery scroll.to to move the grid, dispalying a different square to the user. Am I right in thinking that I wont be able use 100% width and 100% height in my CSS for the single box, since there are actually going to 8 squares that are off the page? [IMG]http://i50.tinypic.com/sfl951.jpg[/IMG] I am guessing therefore that I should use javascript to take the window
newbie....graphic editor in jquery
Hi there, i'm a newbie on jquery. i'll searching an "application" or "plugin" i'll searching a graphic editor (freeware or not) where end-user can manage its' graphic (text + image and so on, not image retouching) save it then apps return "graphic file" to main website. for ex. setup cards, bussines card, greeting and so on i see a working example but i don't be able to find application name.. any idea? thanks Doc
.position().left / Div issue
Ok so I am new to Jquery and have just started reading through Sitepoint's Jquery: Novice to Ninja book. At this point I am trying to script a navigation bar that has a div highlight the background of each link in an unordered list. I've literally copied the code straight out of book just to be sure that I wasn't making any mistakes but the issue still exists. Heres the code: HTML: /////////////// <body> <div id="container"> <div id="header"> <div id="hiddenHeader"><img src="Jquery.png" width="780"
Next Page