[jQuery] How select first link??
Hi all, I am playing with jQuery 1.3 and I have provlem with selecting a first link in code below. Can you help me how how it should look like jQuery code and also for case, if Home will not be a link, so "Rules" will be a first link. My traditional way from jQuery 1.2.6 doesnt work now. ('#menu li a:first') Thx for help in advance. <div id="container"> <ul id="menu"> <li><a href="#">Home</a></li> <li><a href="#">Rules</a></li> <li><a href="#">Pilots</a></li> <li><a
[jQuery] List Box | update image on change
Im sure this is probably very simple...like me :( I have been searching for hours now without any results I have a list box which displays an image when you select it all i want to do is update it to use jquery and also make it so i can use multiple list box's as currently anymore than one list box stops them all from working...I think it needs to be selector based? Here is the current code Im using <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:// www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
[jQuery] premature ready?
Well, maybe.... In my first use of jQuery, I attached a visibility toggle function, via document ready, to a button (button by id, toggling by class), and got very erratic results. Typically, the toggle didn't work on first load of the document, but tended to work if the document was reloaded from cache. * All my CSS is embedded in <head> * All my JS is at the end of <head> * I'm loading 1.3 from Google Code * For any given page load, it either works all the time or fails all the time * I've got
[jQuery] drag and drop doesn'n work well
I would like to show with the alertbox "Droped!" when I dropping ".player" in ".fishing". However that doesn't work except .droppable- activ and .droppable-hover. Why alert("Dropped") doesn't work ? <html> <header> <title>map</title> <style type="text/css"> #map { position: absolute; z-index:-1; left: 50px; right: 50px; width: 600px; } .player { position: relative; z-index:
[jQuery] How to get sum of children element's width
This is the way I got the size now, is there any function can do the same thing? Html code <div> <img src=".......... <img src=".......... <img src=".......... </div> <script> $(function() { $sum = 0; $('div img').each(function() { $sum += $(this).width(); }); console.log($sum); }); </script>
[jQuery] JCarousel Bug? Autostop Doesn't Work When Animating
Hello. I have a jcarousel on a page of my Drupal 6 site. Everything works beautifully, except this one thing... I added this function so that the buttons disappear and the carousel's automatic scrolling stops whenever the mouse hovers over it: carousel.container.hover( function() { carousel.stopAuto(); jQuery ('.jcarousel-prev').fadeIn('slow'); jQuery('.jcarousel-next').fadeIn ('slow');}, function() { carousel.startAuto(); jQuery('.jcarousel- prev').fadeOut('slow'); jQuery('.jcarousel-next').fadeOut
[jQuery] [autosagestion] link in the list
Hello Im beginer with ajax and i nead help . I use the autocomplate plugin and i have this code $("#suggest13").autocomplete(customers, { minChars: 0, width: 310, matchContains: true, autoFill: false, formatItem: function(row, i, max) { return "<a href='index.htm?ID=" + row.ID + "'>" + row.name + "</a>"; }, formatMatch: function(row, i, max) { return row.name + " " + row.ID; }, formatResult: function(row)
[jQuery] Superfish error... the menu can only got 3 layers in
The is an error in the javascript file, and only allows the main menu to have 3 layers of sub menus, after that the 4th layer appears opened along with the 3rd layer, and does not work as desired. Can anybody provide a fix for this? Sergio
[jQuery] Changing bg color of cell does not work in firefox 3 (works in ie7)
When I click on the green cell (td.commsion), its color changes to black. It works fine in IE. In FF the bg color does not change (I do see the console.log message). Any idea why? Here's the code: <script src="../js_lib/jquery-1.2.6.min.js" type="text/javascript" charset="utf-8"></script> <script type="text/javascript"> $(document).ready(function() { $("td.commision").click(function(){ if (window.console) { console.log("Changing td color!");
[jQuery] Problem with jQuery Cycle Plugin
Hello all, I'm using the jQuery Cylce Plugin(http://malsup.com/jquery/cycle/) and I ran into some problems when I added it to some other pre-exising code I have. 1. Here is the working Slideshow - http://www.idea-palette.com/testfolder/slideshowtest.html When I add the existing working Slideshow code from above, the graphics for the buttons won't show up. They are accessing the same folder and files, so I am confused. 2. Here is the Site with the problems - http://www.idea-palette.com/testfolder/pagetest.html
[jQuery] AJAX- i had two different problems each with mozilla and IE
I am tired select box function for geting datafrom the database and display in tabular form. Mozilla--Every thing ok but i am not able to get all the rows from database i am geting 4 and half rows.........i tired GET method......... EXample: xmlHttp.open("GET", "fnctions.php?moviename=" + movie, true); xmlHttp.onreadystatechange = handleRequestStateChange; xmlHttp.send(null); Please help me how to use "post method" or any other method to get all the rows IE---The browser is detected but showing error
[jQuery] .hide() and .height()
I noticed today after much fiddling that .hide() causes the parent element to loose its height(). In other words, height() won't work on elements that have display:none -- causing me to use .hide() only AFTER I've done my .height() - based calculations. I suppose that makes sense but I somehow never really thought that element.height is an attribute that gets set to 0 if display:is set to none...or whatever is actually going on.
[jQuery] [ resolution browser? ]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1"> <META content="MSHTML 6.00.6000.16788" name=GENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=#ffffff> <DIV><FONT face=Arial size=2>Hi,</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>How i can to know resolution of browser?</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>Thank´s</FONT></DIV>
[jQuery] Possible 1.3 bug
I was checking all of my random plugins/scripts to make sure they all work with jQuery 1.3 and I found one that is having problems. An example of it is available at: http://digitalinferno.net/temp/ If you enter some text into the input firebug will report that "filter is not a function" in http://digitalinferno.net/temp/js/jquery.js on line 1961 Anyone know if this is a bug or if I have to change something in my code for the new 1.3 release?
[jQuery] Help getting 2 coda sliders working that are nested
yo javascript dudes please help :/, I am trying to get this working but failing miserably because it is from a pre-made script that I got from a tutorial, and I am modifying it to try and make it do what I want. I am not really all that good with jquery yet, I know just enough to be dangerous. I have been staring at this for a few days and I am getting desperate now. Basically it's a "coda" slider, but in this instance, it is 1 big coda slider that I want to slide horizontally and inside that another
[jQuery] Submitting a form with .submit() problems
Hi, I have a form that looks like this: <table><tr> <form action="http://jquery.com" method="post" id="myForm"> <td> <input value="submit" type="submit" onclick="conversion(1000, this); return false;" /> </td> </form> </tr> </table> The onclick call for the button accesses code which does some special processing and then is supposed to submit the form. The form submission looks like this: jQuery(this.clickedObject).parent('form').slice(0).submit(); Problem is this won't work. I'm assuming it's because
[jQuery] Jquery Calling Servlet
Hi i am calling a servlet using JQuery and my servlets create an excel file at runtime and provides the option for the user to open save or cancel the file created JQuery code is $.post("../reports/BillIDPropIDExcelExport",{csvstring: $ ("#vname1").val(),count:$("#vname2").val(),propType:$("#vname3").val (),instValue:$("#vname4").val()},function(data){ alert(data);document.body.style.cursor="default"; }); and my servlets that creates the file at runtime is try { HSSFWorkbook wb =
[jQuery] Thickbox and Yahoo Stores
I'm helping someone set up thickbox to work on their yahoo store. It seems like Yahoo has a built-in click tracking system that is messing up the thickbox though. For example clicking on a thickbox link that points to "theFile.htm" first makes a request to yahoo for something like: http://a.analytics.yahoo.com/p.pl?a=....... with a ton of analytical data appended to the URL. It returns a tracking gif, and the real content of theFile.htm never loads. (you just stare at thickbox's loadingAnimation.gif
[jQuery] Hide content until loaded
Hi everyone! I'm a jQuery newbie, so I apologize if this is an easy question! I'm building a template for newspaper sites, and by nature of having many ads and modules and so forth, the content loads before the jQuery that styles it, leading to a flash of unstyled content. So, on several of my modules that use a lot of jQuery, I'd like to hide them until they are loaded. Right now, I'm trying to do this: $('tn-hide').css('display', 'none').addClass('tn-loading'); $(document).ready(function() { $('tn-hide').css('display',
[jQuery] How to grab the filename (src attribute) of an image?
Hi all, how do i grab the filename of an image? Situation now: i use "normal" javascript when clicking on an image and just inserted some jquery to post gamedata to update a gamepage with the help of the taconite plugin (returns xml-data), so far so good. I just miss one item => i need the filename (src attribute of the image) of the image on which was clicked, ut just can't figure out how to grab it. Thanks in advance for your help.
[jQuery] More efficient way to find Parent element
after learning the difference between parents and parent, I am having to resort to using parent(), but it's not very clean. Consider the following table, which is embedded in a page, which may have additional tables (for this reason I cannot use parents("table") because it returns multiple tables): <table class="gridview" id="A" cellpadding="0" cellspacing="0"> <tbody> <tr class='gvheader'> <th width="20px"> </th> <th width="150px">Host</th> <th width="100px">Directs To</th> <th width="40px">TTL</th>
[jQuery] load script regarding to value of textfield
hello community, i have some kind of a beginner question and i really would appreciate if you could help me with that. when someone types a value into the textfield and clicks on "search" or enter than the javascript line should be called regarding to the entered value. this should happen without reloading the complete page. # FORM <form id="searchForm" action=""> <input type="text" name="searchText" id="searchText" value="" size="30" maxlength="30"/> <input type="button" name="searchButton" id="searchButton"
[jQuery] [jQuery V1.3] will lead behavior for IE to lose efficacy
Dear all, I use some behavior hack, like the famous Whatever:hover (http:// www.xs4all.nl/~peterned/csshover.html), when I upgrade jQuery to v1.3, it cause this hack to lose efficacy, but works well under jquery v1.2. any body? meet the same problem with me?
[jQuery] premature ready
Well, maybe.... In my first use of jQuery, I attached a visibility toggle function, via document ready, to a button (button by id, toggling by class), and got very erratic results. Typically, the toggle didn't work on first load of the document, but tended to work if the document was reloaded from cache. * All my CSS is embedded in <head> * All my JS is at the end of <head> * I'm loading 1.3 from Google Code * For any given page load, it either works all the time or fails all the time * I've got
[jQuery] jQuery 1.3 selector :first; :first-child
Hi all, I have trouble in jQuery 1.3 with :first; :first-child selector. Always it selects all "a". In version 1.2.6 it worked by suspense. What is new or wrong?? Thx for help. $(function(){ $('#menu li a:first-child').remove(); });
[jQuery] JSONP
Hello! I'd like to use $.getJSON with JSONP support, but i used http://example.com/xxx/yyy URL sheme instead of http://example.com/index.php?a=xxx&b=yyy. I read in documentation, in the 'myurl?callback=?' syntax the ? replaces to the callback name. I tried this: http://example.com/xxx/yyy/? but don't works. I tracking the connection with FireFox's LiveHttpHeaders plugin, and I see jquery don't replaces ? to callback name, only send the http://example.com/xxx/yyy/? url without any change. How can
[jQuery] Images resize problem with Aajx
My process is 1. load images from other php file 2. put the response thing into a div 3. check all image sizes 4. resize image if the size over the restriction the problem is sometimes images resize failed, how to make sure the resize process work. html code <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:// www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
[jQuery] Renderer plugin help
Hi, my situation is that I am having to manipulate dynamic objects after they are rendered because of core component encryption. I am using joomla and jquery has allowed me to get the job done in these circumstances. I love it.. I am using the expander() plugin for an ul and li items. It seems to work but I do not receive the slice of characters to show my intro text. I t always says "read more" and "collapse.." and has my text inside but no intro characters. Joomla has mootools built in and I have
[jQuery] jQuery 1.3 - am I missing something or is this a bug?
Upgraded to 1.3 on my site today and found that previously working code is broken. The issue is that I was using a selector of $ ('.aComment') to get, not surprisingly, elements with a class of 'aComment' . This worked great with 1.2.6. However, with some tinkering, I have found that I can user $('acomment') to select these nodes with 1.3 . Question is, is the expected behavior or a bug? I'm pretty new to a lot of this stuff so I acknowledge my ignorance in advance. However, I thought it a weird
[jQuery] abort an animation?
How can I abort an animation? I have a slow fadeOut() on an element. Under some conditions I would like to stop the fadeout and show the element without any transparency. How can I do this? Stephan
Problem with jQuery Cycle Plugin
Hello all, I'm using the jQuery Cylce Plugin(http://malsup.com/jquery/cycle/) and I ran into some problems when I added it to some other pre-exising code I have. 1. Here is the working Slideshow - http://www.idea-palette.com/testfolder/ ... wtest.html When I add the existing working Slideshow code from above, the graphics for the buttons won't show up. They are accessing the same folder and files, so I am confused. 2. Here is the Site with the problems - http://www.idea-palette.com/testfolder/pagetest.html
cross fade images in 3 divs
Hi I am looking for suggestions of the best way to solve the following problem. I have a website that has a fairly static front page. It contains 3 divs all the same size that, at the moment, display images that link to different pages on the site. I would like to create a little more interest on the page by having a cross fade effect on all three divs to randomly display 4 or 5 linked images. I know there are several jquery plugins that create cross fade effects but I would like something neat that
A simple conceptual question
Hello everyone, I am beginner of jqQuery and I would like to know the following: When using $(document).ready() function is it necessary to place it in between the head tags? Can't we put it, for example, within the body of a document. When I write my own examples I always put this function at the end of body (just before </body>) and they work fine. Can anyone clarify it? Regards.
Facebox + datepicker
hey guys was wondering if anyone can help me out. I'm trying to use Datepicker (http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/index.html) inside Facebox. But it doesn't work. If I load the page without facebox then the datepicker works but when the page loads in facebox the datepicker doesn't work. I'm really new to jquery, could someone please help me out with this. Live example: http://tdesigns.net84.net/test/index.html http://tdesigns.net84.net/test/remote.html Many thanks
[jQuery] .live help needed
I'm playing around with the new .live functionality. it seems very cool. I have a page that gets refreshed with ajax with a .live getting set for a list of links every time, so I need to call .die but .dies doesn't seem to be working... $('a[name=prioritya]').die('click', currFxn); $('a[name=prioritya]').live('click', currFxn); I don't think it matters what currFxn does, but it is a defined function. Any idea why .die isn't working? Secondly, if I call $('a[name=prioritya]').die('click'); does that
[jQuery] jQuery 1.3 live() vs listen/intercept plugins
I'm trying to understand where the new live() fits in to the world of event delegation, and plugins like listen and intercept What are the arguments for one approach over the other? thanks!
Coda Slider Help (2 on one page + nested)
yo javascript dudes please help :/, I am trying to get this working but failing miserably because it is from a pre-made script that I got from a tutorial, and I am modifying it to try and make it do what I want. I am not really all that good with jquery yet, I know just enough to be dangerous. I have been staring at this for a few days and I am getting desperate now. Basically it's a "coda" slider, but in this instance, it is 1 big coda slider that I want to slide horizontally and inside that another
[jQuery] Plugin problem with mouseover/mouseout and setTimout
I have this bit of code here and I am trying to make it fade out if the mouse has been off it for 5 seconds... but if the mouse comes over it before the time is up, I want it to abandon fadeOut and wait until the mouse leaves again to fade out.... my code doesn't work... Can someone help me with this? // Adjust the Mouse over with no sticky $(this).removeAttr("title").mouseover(function(){ bs_tooltip.css({"opacity":opacity}).fadeIn(speed); }).mouseout(function(){ //Time out
[jQuery] Use a function on code loaded with AJAX
Hi, I am trying to use a click.function on a piece of code that has been loaded with AJAX. I can't imagine how to do this at the moment. Any tipps? Thanks, Michael
[jQuery] objects, prototypes, and closures
I am having a problem with an Object using closures, and referencing the "this" reference from within the closure. $.extend(MyObject.prototype, { save: function(id) { var html="some html"; $.post( 'post_page.php', {'id':id, 'c':html}, function(data) { this.save_complete(data.div_id, data.content); }, 'json'); save_complete: function( id, content ) { alert( "saved: " + id ); } }); If I call save() on this object, and the AJAX
Next Page