Re: [jQuery] Simple XML Parsing Question
Instead of find, use children? On Nov 17, 2009 2:56 PM, Joe joecel...@gmail.com wrote: I have been banging my head against the wall and searching for answers for the past week, so any help or direction would be appreciated. I am sure that I am missing something obvious. I have some XML that looks like this: ?xml version=1.0 encoding=UTF-8? customMessageList CustomMessage id181/id nameFirst Message/name customMessageImage id135/id nameSample_img.png/name contentTypeimage/png/contentType modifiedOn2009-08-25 11:25:28.34/modifiedOn /customMessageImage /CustomMessage /customMessageList And an AJAX call that looks like this: $.ajax({ type: GET, url: myURL, success: function(xml) { $(xml).find('CustomMessage').each(function(){ var id_text = (this).find('id').text(); var name_text = $(this).find('name').text(); var contentType_text = $(this).find('contentType').text(); }); //close each( } } }); When i run this code, the id and name variables have all the id/name nodes in them. I only want the id/name for the child node. the contentType variable works find (but there is only one instance. Any ideas on how to fix this? I am at my wits end. thx, Joe C
[jQuery] JQuery Dialog, bug when page loading?
Hello all, I have a question, I'm not sure if is a Dialog bug or I do something wrong. When page is loading(at the beginning). I can see for a short time(approx 1 sec) the component of the Dialog. If I use a confirmation Dialog, with the question: Are you sure?, I get this messages on the page body on page loading. This goes out after 1 sec, but this is not acceptable.
[jQuery] Re: jquery tabs and dynamic content
The link you gave, just fixed the height of the container. But if you want to do so, you can first: 1.) when document ready, show all tabs at first 2.) loop though and get the height of each to choose the max 3.) hide all tabs (left the default show) On Nov 18, 10:34 am, danito daniszw...@gmail.com wrote: Hello people, I was trying to find some info about the autoheight parameter in previous versions of the jquery tabs. If the content of my tabs is loaded dynamicaly, how can I accommodate the height of all the tabs to the largest one? Thank you Example atwww.thiez.com
[jQuery] where to start ajax learinig
Hello, can u tell me where to start ajax. i am new learner of ajax. i know just simple creation of request object. proceduers,events and properties of request object. tell me where to start ajax how to use of ajax like gmail,yahoo also facebook. thanx
[jQuery] Re: getjson request an unavailable page
use $.ajax() instead, you can define function when the ajax fails On Nov 18, 12:17 am, Humpty Dumpty ste...@gmail.com wrote: Hi guys, I write a web page that retrieve the data from a JSON formatted file but when this fiel doesn't exist I can't see any error; how I can handle this situation thanks
[jQuery] Re: how to parse xml with namespace ?????
Can you show the code you are using. On Nov 18, 1:18 pm, g...@iec abhi.pur...@gmail.com wrote: Can anybody provide me with some suggestions regarding above mentioned issue On Nov 17, 7:15 pm, g...@iec abhi.pur...@gmail.com wrote: Hi all, I have came across an issue related to xml parsing. Here is code for parsing xml with namespace : var data = {xml content}; $(data).find('{namespace}\\:nodename').each(function() { { Code to perform something.} }); This code works fine in IE and FF and xml got parsed as expected. But it is not workng with safari. Can anybody help me out to parse xml with namespaces using jquery so that it work fine in all browsers??? Thanks to all for showing there concern.
Re: [jQuery] superfish and pixopont menu
To be honest, I find the whole structure a little confusing, however, that said, I have had a quick look at your site and it seems that you are trying to run the superfish plugin, without JQuery. You also have scriptaculous in there too... Maybe that could be a good starting point. Regards Marc On 11 Nov 2009, at 15:54, lukeh wrote: Im trying to activate the superfish options in my pixopoint menu here http://plocaclimbing.com I could really use some help. (am finding the installation a bit confusing). i have the plugin on my server, i just need to know where to put the script to activate it (ive tried unsuccessfully) ive included the css to my menu and my header.php file. Sorry if this is not the proper way to go about posting questions, im pretty new at this :) 1. Link to the superfish.js file using a script tag in the head of your document. script type=text/javascript src=superfish.js/script 2 Call superfish() on the containing ul element. script type=text/javascript $(document).ready(function() { $('ul.sf-menu').superfish(); }); /script heres my css for the menu: /* *** Main menu **/ #pixopoint_menu1 { width:100%; height:40px; background:#ee url(http://www.plocaclimbing.com/ menufeedbox.png) repeat-x; background-position:50% 0; margin:0;} #pixopoint_menu1 ul { width:100%; border:none; background:none; margin:0; padding:0; list-style:none; } #pixopoint_menu1 li { border:none; background:none; background:#00 url(http://www.plocaclimbing.com/ menufeedbox.png); color:#FF; line-height:40px; z-index:20; letter-spacing:0px; background:; font-weight:normal; font-size:17px; padding:0; margin:0 5px; ;float:left; font-family:courier-new,courier,monospace; position:relative; } #pixopoint_menu1 li:hover,#pixopoint_menu1 li.sfhover { background:#616161 url(http://www.plocaclimbing.com/ menufeedbox1.png); background-position:0 60px; } #pixopoint_menu1 li a { border:none; background:none; text-decoration:none; display:block; padding:0 15px; color:#FF; } #pixopoint_menu1 li a:hover { border:none; background:none; text-decoration:none; color:#FF; background-position:100% -120px; } #pixopoint_menu1 ul ul { position:absolute; left:-999em; top:40px; width:120px; } #pixopoint_menu1 li:hover ul,#pixopoint_menu1 li.sfhover ul { left:auto; } #pixopoint_menu1 ul ul li a { padding:4px 10px; text-transform:normal; font-variant:normal; } #pixopoint_menu1 ul ul li { letter-spacing:0px; color:#66; z-index:20; width:120px; font-family:helvetica,arial,sans-serif; font-size:11px; font-weight:normal; font-style:normal; background:#FF; border-bottom:1px solid #cc; border-left:1px solid #cc; border-right:1px solid #cc; margin:0; } #pixopoint_menu1 ul ul li a { line-height:22px; color:#66; text-decoration:none; } #pixopoint_menu1 ul ul li:hover a,#pixopoint_menu1 ul ul li.sfhover a { color:#FF; text-decoration:none; } #pixopoint_menu1 ul ul li:hover li a,#pixopoint_menu1 ul ul li.sfhover li a { color:#66; } #pixopoint_menu1 ul ul li:hover li a:hover,#pixopoint_menu1 ul ul li.sfhover li a:hover { color:#FF; } #pixopoint_menu1 ul ul li:hover,#pixopoint_menu1 ul ul li.sfhover { color:#FF; background:#BBB1B1; } #pixopoint_menu1 ul ul ul li { font-size:1em;}#pixopoint_menu1 ul ul ul, #pixopoint_menu1 ul ul ul ul { position:absolute; margin-left:-999em; top:0; width:120px; } #pixopoint_menu1 li li:hover ul,#pixopoint_menu1 li li.sfhover ul,#pixopoint_menu1 li li li:hover ul,#pixopoint_menu1 li li li.sfhover ul { margin-left:120px; } #pixopoint_menu1 ul ul li:hover li a,#pixopoint_menu1 ul ul li.sfhover li a { text-decoration:none; } #pixopoint_menu1 ul ul li li:hover a,#pixopoint_menu1 ul ul li li.sfhover a { color:#FF; text-decoration:none; } #pixopoint_menu1 li.pixo_search:hover { background:none; } #pixopoint_menu1 li.pixo_search form { margin:0; padding:0; } #pixopoint_menu1 li.pixo_search input { font-family:courier-new,courier,monospace;} #pixopoint_menu1 li.pixo_search input.pixo_inputsearch { width:100px; } #pixopoint_menu1 li.pixo_right
Re: [jQuery] where to start ajax learinig
You can start here : http://docs.jquery.com/Ajax There's good reading in the documentation. Michel Belleville 2009/11/18 Ankur_Patel ankurpate...@gmail.com Hello, can u tell me where to start ajax. i am new learner of ajax. i know just simple creation of request object. proceduers,events and properties of request object. tell me where to start ajax how to use of ajax like gmail,yahoo also facebook. thanx
Re: [jQuery] Konami Code :]
Can I just say Brilliant!! I think this will probably make it's way onto my site/s at some point fairly soon!! Thanks On 16 Nov 2009, at 21:03, Ash wrote: Every body loves a little treat in their websites... Well I believe jQuery holds the PERFECT javascript library for doing the Konami Code. A fan of Konami, and having such a cool little hidden feature to your websites, I decided i'd share my code with the world, or at least those people who'd like it.. Just like the PHP logo change, creativity with this little beauty will keep your mind going for ever ;) [code] $(function (){ var press = 0, keys = [38, 38, 40, 40, 37, 39, 37, 39, 66, 65]; $(document).keydown(function (e){ if (e.which == keys[press]) press++; else press = 0; if (press == keys.length) (function (){ // your little treat... }); }); }); [/code]
[jQuery] Re: Scroll so that an element is at the bottom of the viewport
thx for the reply :) doesn't work like i wanted to tho. but i'm gonna tweak it some more. thx for the tips, i'll post the code and example later once i got it working. On Nov 16, 12:15 am, Ariel Flesler afles...@gmail.com wrote: This should do. $.scrollTo('#elem', 1000, { over:{ top:0.5 }, offset:{ top: -$(window).height() / 2 } }); On Sun, Nov 15, 2009 at 10:35 AM, Rizky br4inwas...@gmail.com wrote: hi ariel, great plugin here, i'm using it for my next project (if the marketing guys could win the pitch). currently it's still a prototype. i have a question as well. what should i do if i want to scroll to an element and make it appear in the center of the viewport? all elements are absolutely positioned. thx for the help. -- Ariel Fleslerhttp://flesler.blogspot.com
[jQuery] Image Thumbnail Rollover
I am trying to create an image thumbnail/rollover in JQuery for a client so the main image rotates every 5 seconds just like the LBC website. Does anybody know where I can find the tutorial for this link in JQuery http://www.lbc.co.uk/ Would really appreaciate any help you can give. Bernardom -- View this message in context: http://old.nabble.com/Image-Thumbnail-Rollover-tp26406520s27240p26406520.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] i need help on jquery ^^
im trying to hide and show the images with a plus sign separating the images to each other. onclick on the checkbox the image and the plus sign will hide/show. image1 + image2 + image3 checkbox1 checkbox2 checkbox3 onclick at the checkbox1 the image1 and + will hide/show same action goes to other checkboxes, my problem is that how to hide/show the plus sign + if i click on the checkbox3 or if i click on the checkbox2 which of the plus sign will hide/show. can you please create a jquery script for me?
[jQuery] Need help in making AJAX call in IE8
HI All I am trying to load XML file using following code. $(document).ready(function() { $.ajax({ type: GET, url: D:\Documents and Settings\santosh.chavan\Desktop\ajaxJqueryXML \data.xml, dataType: xml, success: function(xml) { alert(xml); } }); }); This code is returning me object if i configured this page in IIS. If i load this page from local drive, its not returning me xml object. same code return me object in firefox on local drive. please guide for same.
[jQuery] Get the td below and above
Hi there, I'm new to jQuery and was looking for a way to get a table cell above or below the current one. What I mean is a function like .prev() or .next() but those only help me getting the cell to the left or to the right.
[jQuery] Simple XML parsing - getting the element tag
Hi list, I've run up against a small problem processing my ajax response using jQuery. Suppose I have this xml returned from a post or ajax call: ?xml version=1.0 ? !DOCTYPE sebResponse sebResponse element1some text/element1 element2more text/element2 /sebResponse The key thing here is that I don't know what elements will be in sebResponse; it could be as shown, or there could be a hundred different elements. I'd like to iterate through this xml (which is contained in an object called data, returned from the ajax call) to get the element tag-name and the element contents. I can get the contents like this: $(sebResponse, data).children().each(function() { alert (element content is: + $(this).text()); }); This gives me access to the content of each element - some text, more text, but I also need the element name in each case. Can anyone tell me how to get that? best regards, Seb James
[jQuery] iHwy jQuery ListMenu Plugin Demos, slowing it down a little
HI All, I'm hoping somebody can give me some pointers. I am using the above mentioned plug in (http://www.ihwy.com/Labs/demos/current/jquery-listmenu-plugin.aspx). As such it is working fine but I would like to slow some actions down a little I have modified the css so that the list of sorted names does not have that much margin, unfortunatly this means that the mouse can easily hover over the characters or it is easy to leave the list area or hit one of the characters. As a result the list disappears or is replaced by the list of another character. It is especially a nuisance when the character U has only one item so that you have to move the mouse across a big part of the page. I tried to implement jquery.event.hover.js but I think the problem here is that parts of the html have not been generated when the page is opened so I think that will not work. I also tried hoverIntent.js (http://cherne.net/brian/resources/jquery.hoverIntent.html) by loading the js before I load the listmenu.js and replacing the hover calls to hoverIntent but I don't think that is enough, I have seen no difference anyway. I have looked at cluetip.js, which uses hoverintent but this did not help. I also have tried to set the setTimeout values, this helped a little but not everywhere. It would be nice if i would not react that quickly when you leave the list area or hit one of the characters. Anyone any ideas? Regards, Gerrit
Re: [jQuery] Re: Functions
Hi Greg, I'm defined an ID to my table (ID = tb) that have my report, and trying to code like this: $(#tb a).click(function() { alert('Test'); }); But it doesnt working. In other words, how can I define that all a in my table triggers an event when clicked? Tks
Re: [jQuery] Need help in making AJAX call in IE8
AJAX calls does not work with local documents, I'll let you guess why (hint : what if I decided to read what's in your local files using my webpage, then send it to a database of mine so I can log into your favorite forum, online game, internet order site, webmail, etc. just for the fun of it... or not). Michel Belleville 2009/11/18 santosh chavan chavan.santos...@gmail.com HI All I am trying to load XML file using following code. $(document).ready(function() { $.ajax({ type: GET, url: D:\Documents and Settings\santosh.chavan\Desktop\ajaxJqueryXML \data.xml, dataType: xml, success: function(xml) { alert(xml); } }); }); This code is returning me object if i configured this page in IIS. If i load this page from local drive, its not returning me xml object. same code return me object in firefox on local drive. please guide for same.
Re: [jQuery] i need help on jquery ^^
Well, it's not usual to see a job offer on jQuery's mailing list. What do you offer mate (beside your undying friendship) ? Michel Belleville 2009/11/18 kramnavi markiva...@gmail.com im trying to hide and show the images with a plus sign separating the images to each other. onclick on the checkbox the image and the plus sign will hide/show. image1 + image2 + image3 checkbox1 checkbox2 checkbox3 onclick at the checkbox1 the image1 and + will hide/show same action goes to other checkboxes, my problem is that how to hide/show the plus sign + if i click on the checkbox3 or if i click on the checkbox2 which of the plus sign will hide/show. can you please create a jquery script for me?
[jQuery] Auto-select one value
Hi all. I'm still trying to fill a form automagically. So, after filling the country text box, I want to be able to auto-select the same value. How can I achieve this? I was thinking about something like: field = $('#country'); field.val('United States'); field.autocomplete({select: field.val()}); I know that this won't work, but where can I found the documentation? I can't find it in anywhere. And the docs at jquery.com are so superficial. Regards, davi
Re: [jQuery] Need help in making AJAX call in IE8
When I need to use ajax in my applications I implement the $.post and never had problems. Try to use this.
Re: [jQuery] JQuery Dialog, bug when page loading?
Hide the dialog in the html by putting it in a hidden container, or putting style=display:none; on the element itself. When you call .dialog('open') that attribute will be removed. - Richard On Wed, Nov 18, 2009 at 4:20 AM, NMarcu marcu.nico...@gmail.com wrote: Hello all, I have a question, I'm not sure if is a Dialog bug or I do something wrong. When page is loading(at the beginning). I can see for a short time(approx 1 sec) the component of the Dialog. If I use a confirmation Dialog, with the question: Are you sure?, I get this messages on the page body on page loading. This goes out after 1 sec, but this is not acceptable.
Re: [jQuery] Need help in making AJAX call in IE8
$.post() won't work on a local file either. Local or distant you have to talk to a web server, tapping the local file system won't work, and that's a feature. Michel Belleville 2009/11/18 Denis Caggiano denisribe...@gmail.com When I need to use ajax in my applications I implement the $.post and never had problems. Try to use this.
[jQuery] Re: how to parse xml with namespace ?????
Here is the code : var data = {xml content}; $(data).find('{namespace}\\:nodename').each(function() { { Code to perform something.} }); On Nov 18, 2:42 pm, Peter hokwai...@gmail.com wrote: Can you show the code you are using. On Nov 18, 1:18 pm, g...@iec abhi.pur...@gmail.com wrote: Can anybody provide me with some suggestions regarding above mentioned issue On Nov 17, 7:15 pm, g...@iec abhi.pur...@gmail.com wrote: Hi all, I have came across an issue related to xml parsing. Here is code for parsing xml with namespace : var data = {xml content}; $(data).find('{namespace}\\:nodename').each(function() { { Code to perform something.} }); This code works fine in IE and FF and xml got parsed as expected. But it is not workng with safari. Can anybody help me out to parse xml with namespaces using jquery so that it work fine in all browsers??? Thanks to all for showing there concern.
[jQuery] Re: Scroll so that an element is at the bottom of the viewport
This is a new site with video tutorials that I recently found via boagworld.com podcast. They have a video tutorial that is similar to what you want. http://jqueryfordesigners.com/fixed-floating-elements/ -G On Nov 18, 10:56 am, Rizky br4inwas...@gmail.com wrote: thx for the reply :) doesn't work like i wanted to tho. but i'm gonna tweak it some more. thx for the tips, i'll post the code and example later once i got it working. On Nov 16, 12:15 am, Ariel Flesler afles...@gmail.com wrote: This should do. $.scrollTo('#elem', 1000, { over:{ top:0.5 }, offset:{ top: -$(window).height() / 2 } }); On Sun, Nov 15, 2009 at 10:35 AM, Rizky br4inwas...@gmail.com wrote: hi ariel, great plugin here, i'm using it for my next project (if the marketing guys could win the pitch). currently it's still a prototype. i have a question as well. what should i do if i want to scroll to an element and make it appear in the center of the viewport? all elements are absolutely positioned. thx for the help. -- Ariel Fleslerhttp://flesler.blogspot.com
[jQuery] Re: Rounding numbers
Thanks a lot. that worked. I think you meant Math.ceil which did the trick. On Nov 16, 7:34 pm, PiotrJaniak janiak.piot...@gmail.com wrote: OK; here u go: $(#insulBlocks).html(Match.ceil(parseInt($(#totalArea).html()) / . 889 * 2)); $(#8Blocks).html(Match.ceil(parseInt($(#insulBlocks).html()) * .25 * 100) / 100); $(#10Blocks).html(Match.ceil(parseInt($(#insulBlocks).html()) * . 35 * 100) / 100); $(#12Blocks).html(Match.ceil(parseInt($(#insulBlocks).html()) * . 55 * 100) /100); On 17 Lis, 01:16, cfred fallreco...@gmail.com wrote: Yes, I tried what other posts said without luck. Which is why I posted my code to see if someone would be kind enough to help. Thanks. On Nov 16, 5:34 pm, PiotrJaniak janiak.piot...@gmail.com wrote: Hi, there is a search box in the top right of this page;) http://groups.google.com/group/jquery-en/browse_thread/thread/e819cef... On 16 Lis, 05:02, cfred fallreco...@gmail.com wrote: I am having trouble rounding numbers in the code below. I would like insulBlocks to round up to a whole number and 8Blocks, 10Blocks 12Blocks to round to 2 decimal places. I've tried several things but being a newbie I'm guessing I'm just putting things in the wrong place. Thanks for reading. $(document).ready(function(){ $(:text).change(function() { //alert( ( ( ($(#houseLength).val()*1) + ($ (#houseWidth).val()*1) )*2 ) * ($(#wallHeight).val ()*1) ); //alert((($(#houseLength).val()*1) + ($(#houseWidth).val()*1)) *2) * ($(#wallHeight).val()*1); // SET DISPLAY //$(#totalArea).html((($(#houseLength).val()*1) + ($ (#houseWidth).val()*1))*2) * ($(#wallHeight).val()*1); $(#totalArea).html$(#houseLength).val()*1) + ($ (#houseWidth).val()*1))*2) * ($(#wallHeight).val()*1)); $(#insulBlocks).html(parseInt($(#totalArea).html()) / .889 * 2); $(#8Blocks).html(parseInt($(#insulBlocks).html()) * .25); $(#10Blocks).html(parseInt($(#insulBlocks).html()) * .35); $(#12Blocks).html(parseInt($(#insulBlocks).html()) * .55); }); $(#clear).click(function() { $(:text).val(); $(.result).html(); $(#houseLength).focus(); return false; }); $(#quoteit).click(function() { $(#carton).submit(); }); });
[jQuery] Re: getjson request an unavailable page
Thanks, I though that there was a JSON solution; ok, I will try by the use of ajax but nobody that used getjson had this problem?
[jQuery] Re: JQuery - how to fade and loop background style
u can use something like below: $(function() { setInterval(color_rotator(), 2000); }); color_rotator() -- Code Html such tht it has 4 divs (with diff color), and with Jquery try looping with it. On Nov 17, 11:39 pm, Dan dan.loff...@gmail.com wrote: That works when I click the box. How would I make it work as a slideshow that requires no action and loops indefinitely? On Nov 17, 12:00 pm, Richard D. Worth rdwo...@gmail.com wrote: jQuery UI effects core adds color animation and class transitions: http://jqueryui.com/demos/animate/ http://docs.jquery.com/UI/Effects/animate You can download it here: http://jqueryui.com/download just check 'Effects Core' - Richard On Tue, Nov 17, 2009 at 11:43 AM, Dan dan.loff...@gmail.com wrote: Hi All, Is there a way to fade and loop a background-color of a div element? I would like it to change every 10 seconds or so, from green to orange to purple and then loop back to green and start again. With a fade effect. I have searched high and low for a plugin, or tutorial, to no avail. Thanks. Dan
[jQuery] Re: Removed iframe still loads
Anyone? On Nov 4, 4:52 pm, Subtle subtlekil...@gmail.com wrote: When trying to remove aniframefrom the dom (i.e. $('iframe').remove ()) while theiframeis still loading, theiframeisremoved, however the main browsers progress bar indicates that theiframeis still loading. Is there a way to stop it from loading and remove it? Thanks.
[jQuery] Re: Removed iframe still loads
Figured it out. I was removing the iframes container (div), and not the iframe specifically. To fix the problem I had to target the iframe specifically and remove it, and then it's container. On Nov 18, 7:45 am, Subtle subtlekil...@gmail.com wrote: Anyone? On Nov 4, 4:52 pm, Subtle subtlekil...@gmail.com wrote: When trying to remove aniframefrom the dom (i.e. $('iframe').remove ()) while theiframeis still loading, theiframeisremoved, however the main browsers progress bar indicates that theiframeis still loading. Is there a way to stop it from loading and remove it? Thanks.
[jQuery] Re: Unordered List question!
On Nov 17, 6:02 pm, szuwei sweit...@hotmail.com wrote: Thanks a lot! And no, this is not a homework. I'm just new to JQuery, and it's a work problem. Well, if you're just learning, the suggestion above was more clever than pedagogical. I would really suggest that you use something more like http://jsbin.com/olowa (code http://jsbin.com/olowa/edit) This puts the actual formatting in CSS, where it belongs: .special {text-indent: 2em;} .odd {color: red;} And doesn't do any complicated .find()-.end() switching of the jQuery, using instead a simple: $(#myList li:odd).addClass(odd); $(#myList li:eq(4)).hoverClass(special); This uses a minor plug-in to jQuery which I use so often I would choose to put it in core if I could: $.fn.hoverClass = function(className) { return this.hover(function() {$(this).addClass(className);}, function() {$(this).removeClass (className);}); } Cheers, -- Scott
[jQuery] Re: Table sorter plugin not properly sorting Distance column (ie: 17 Miles)
Thanks so much! Here is my final version of the script: script type=text/javascript $(document).ready(function() { $.tablesorter.addParser({ id: 'distance', is: function(s) { return false; }, format: function(s) { var v = + s; //make sure we're working with a string v = v.substr(0, v.indexOf( )); return Number(v); }, type: 'numeric' }); $(#locationsTable).tablesorter( {sortList: [[1,0]], headers: { 0: { sorter: false }, 1: { sorter:'distance' }, 2: { sorter: false }, 3: { sorter: false } } } ); }); /script On Nov 17, 2:32 pm, MorningZ morni...@gmail.com wrote: First, understand *why* it doesn't work: - You add miles to the table cell, then Tablesorter treats it as a string value Now that this is understoodd, the solution is to use a custom parser to strip out the label, here is an example http://jsbin.com/unepe/edit On Nov 17, 11:17 am, Yvan yvana...@gmail.com wrote: I'm using the tableshorter plugin on a table which lists multiple locations, and that contains a Distance column which displays distances in the format of 17 Miles and 5 miles, etc. I have the following javascript in my head section, which defines the sort order of the 1 column that I want to have sortable (and that specifies which columns I do not want to make sortable): script type=text/javascript $(document).ready(function() { $(#locationsTable).tablesorter( {sortList: [[1,0]], headers: { 0: { sorter: false }, 2: { sorter: false }, 3: { sorter: false } } } ); }); /script I'm finding that I am not able to properly sort the distance column when I include the word Miles in that table cell. It's only when I remove the word Miles from the table cell that the column sorts properly. How can I fix this? Thanks, - Yvan
[jQuery] Re: Removed iframe still loads
Actually that still didn't work... On Nov 18, 7:54 am, Subtle subtlekil...@gmail.com wrote: Figured it out. I was removing the iframes container (div), and not the iframe specifically. To fix the problem I had to target the iframe specifically and remove it, and then it's container. On Nov 18, 7:45 am, Subtle subtlekil...@gmail.com wrote: Anyone? On Nov 4, 4:52 pm, Subtle subtlekil...@gmail.com wrote: When trying to remove aniframefrom the dom (i.e. $('iframe').remove ()) while theiframeis still loading, theiframeisremoved, however the main browsers progress bar indicates that theiframeis still loading. Is there a way to stop it from loading and remove it? Thanks.
[jQuery] Re: Cascade plugin and multiple selected values
sorry what I meant was jQuery(#chained_child).trigger(cascade) Please read up on events in jquery and check out the source On Nov 11, 3:33 pm, rmachado rmachado...@gmail.com wrote: Hello and thanks for the reply I'm trying to use the solution you propose, but I'm new to jquery and I can't make it work. My code is: jQuery(document).ready(function() { jQuery(#chained_child).cascade(#chained,{ list: list1, template: commonTemplate, match: commonMatch }); jQuery(#chained_sub_child).cascade(#chained_child,{ list: list2, template: commonTemplate, match: commonMatch }); jQuery(#chained_sub_child1).cascade(#chained_child,{ list: list3, template: commonTemplate, match: commonMatch }); }); /script script type=text/javascript function startDrops() { $('#chained [value=2').attr('selected','selected').parent().change (); $('select#parent').trigger('cascade'); $('#chained_child [value=3').attr('selected','selected').parent ().change(); } /head body onload=Javascript:startDrops(); ... I tried also: $('select#chained').trigger('cascade'); and several variations... But it didn't work. :( Can you help me? Thanks On 11 Nov, 02:06, Mike Nichols nichols.mik...@gmail.com wrote: $('select#parent').trigger('cascade'); ? On Nov 9, 5:08 pm, rmachado rmachado...@gmail.com wrote: Hello to all I using thecascadeplugin in 3 dropdowns and it works fine, but in some ocasions I need to pre selected the values because the user is editing the previous recorded selections. I manage to selected the value of the first dropdown with the following code: $('#chained [value=1').attr('selected','selected').parent().change(); but how can I selected the second one and the third? I tried this: script type=text/javascript function startDrops() { $('#chained [value=1]').attr('selected','selected').parent().change (); $('#chained_child [value=3]').attr('selected','selected').parent ().change(); } /script ... body onload=Javascript:startDrops(); But it didn't work.. How can I do it? Thanks
[jQuery] Re: Removed iframe still loads
Hi Subtle, I'm a little confused to exactly what's going on. Do you have a link/example I can check out? On Nov 18, 10:01 am, Subtle subtlekil...@gmail.com wrote: Actually that still didn't work... On Nov 18, 7:54 am, Subtle subtlekil...@gmail.com wrote: Figured it out. I was removing the iframes container (div), and not the iframe specifically. To fix the problem I had to target the iframe specifically and remove it, and then it's container. On Nov 18, 7:45 am, Subtle subtlekil...@gmail.com wrote: Anyone? On Nov 4, 4:52 pm, Subtle subtlekil...@gmail.com wrote: When trying to remove aniframefrom the dom (i.e. $('iframe').remove ()) while theiframeis still loading, theiframeisremoved, however the main browsers progress bar indicates that theiframeis still loading. Is there a way to stop it from loading and remove it? Thanks.
[jQuery] Disable cursor wait during animation
I have this annoying wait cursor that shows during animations (for instance changing the opacity of next/prev buttons or sliding images). I have noticed this problem only on IE6 (I have tested on a couple of PCs and the wait cursor shows on all of them). Setting the cursor using CSS doesn't help so I understand the problem is somewhere esle. I would appreciate any information regarding this issue. You can see the issue here http://bit.ly/2gdhRY -- View this message in context: http://old.nabble.com/Disable-cursor-%22wait%22-during-animation-tp26408393s27240p26408393.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Removed iframe still loads
Hi, actually I currently don't. Basically I have an iframe on a page that loads a very large file. On the page there is a button that when clicked, will remove the iframe's container (the div): $ ('#iframeContainer').remove(); What I expected to happen was that after the iframeContainer was removed, the browser would stop trying to finish the request made by the iframe. Instead, even though the iframe was removed, the browser was still trying to load the big file. I think I figured it out though. If I set the src on the iframe to something like src=# and then remove it, then it appears to work and the iframe stops loading. Thanks On Nov 18, 8:08 am, StephenJacob turnstylecreat...@gmail.com wrote: Hi Subtle, I'm a little confused to exactly what's going on. Do you have a link/example I can check out? On Nov 18, 10:01 am, Subtle subtlekil...@gmail.com wrote: Actually that still didn't work... On Nov 18, 7:54 am, Subtle subtlekil...@gmail.com wrote: Figured it out. I was removing the iframes container (div), and not the iframe specifically. To fix the problem I had to target the iframe specifically and remove it, and then it's container. On Nov 18, 7:45 am, Subtle subtlekil...@gmail.com wrote: Anyone? On Nov 4, 4:52 pm, Subtle subtlekil...@gmail.com wrote: When trying to remove aniframefrom the dom (i.e. $('iframe').remove ()) while theiframeis still loading, theiframeisremoved, however the main browsers progress bar indicates that theiframeis still loading. Is there a way to stop it from loading and remove it? Thanks.
[jQuery] Re: Removed iframe still loads
No, thank you for posting the solution! Good job and good luck. On Nov 18, 10:14 am, Subtle subtlekil...@gmail.com wrote: Hi, actually I currently don't. Basically I have an iframe on a page that loads a very large file. On the page there is a button that when clicked, will remove the iframe's container (the div): $ ('#iframeContainer').remove(); What I expected to happen was that after the iframeContainer was removed, the browser would stop trying to finish the request made by the iframe. Instead, even though the iframe was removed, the browser was still trying to load the big file. I think I figured it out though. If I set the src on the iframe to something like src=# and then remove it, then it appears to work and the iframe stops loading. Thanks On Nov 18, 8:08 am, StephenJacob turnstylecreat...@gmail.com wrote: Hi Subtle, I'm a little confused to exactly what's going on. Do you have a link/example I can check out? On Nov 18, 10:01 am, Subtle subtlekil...@gmail.com wrote: Actually that still didn't work... On Nov 18, 7:54 am, Subtle subtlekil...@gmail.com wrote: Figured it out. I was removing the iframes container (div), and not the iframe specifically. To fix the problem I had to target the iframe specifically and remove it, and then it's container. On Nov 18, 7:45 am, Subtle subtlekil...@gmail.com wrote: Anyone? On Nov 4, 4:52 pm, Subtle subtlekil...@gmail.com wrote: When trying to remove aniframefrom the dom (i.e. $('iframe').remove ()) while theiframeis still loading, theiframeisremoved, however the main browsers progress bar indicates that theiframeis still loading. Is there a way to stop it from loading and remove it? Thanks.
[jQuery] Re: Trigger button click event when lost focus in textbox
Nevermind. I put the function click to another function and trigger the function in textbox's blur event. Thanks. On Tue, Nov 17, 2009 at 5:06 PM, ian ian.esca...@gmail.com wrote: I have a textbox and button to check items in the database. The thing is I want to trigger the button click event when textbox is lost focus. This is my click event. $(document).ready(function() { $(#button_from).click(function() { $(#waitingFrom).show(); $.ajax({ type: 'POST', url: 'index.php?m=itema=getPartName', dataType: 'json', data: { part_no: $(#from_part_no).val() }, success: function(data) { $(#waitingFrom).hide(); $(#tfrom_part_name).val($(#from_part_name).val (data.DESCRIPTION).val()); $(#tfrom_status).val($(#from_status).val (data.INVENTORY_ITEM_STATUS_CODE).val()); $(#tfrom_inventory).val($(#from_inventory).val (data.TRANSACTION_QUANTITY).val()); $(#tfrom_usage_rate).val($(#from_usage_rate).val (data.USAGE_RATE).val()); } }); }); I need help to call that click event when let's say $(#from_part_no) has lost focus. Thanks in advance. -- Ian Escarro
[jQuery] slider question
http://www.switchonthecode.com/tutorials/using-jquery-slider-to-scroll-a-div If use jQuery slider directly, the handle box will not fit the slider track but in that website, it's totally fit the slider, and I didn't see anything particular in his code how to do that?
[jQuery] Re: how to parse xml with namespace ?????
You may wish to consider using biterscripting for parsing XML. It will parse the exact the same way regardless of the browser installed. If you goole biterscripting and XML, you should see several scripts to parse XML posted all over the net. On Nov 17, 9:15 am, g...@iec abhi.pur...@gmail.com wrote: Hi all, I have came across an issue related to xml parsing. Here is code for parsing xml with namespace : var data = {xml content}; $(data).find('{namespace}\\:nodename').each(function() { { Code to perform something.} }); This code works fine in IE and FF and xml got parsed as expected. But it is not workng with safari. Can anybody help me out to parse xml with namespaces using jquery so that it work fine in all browsers??? Thanks to all for showing there concern.
[jQuery] How to apply blur function to two classes?
Hi, I have to apply an onblur function to elements of type numAdultsField or numChildrenField. How do I do that? This isn't working ... $(.numAdultsField .numChildrenField).blur(function() { var id = $(this).attr(id); var eltPrefix = id.substring(0, id.toLowerCase().indexOf (num)).replace(:, \\:); var numAdultsElt = $('#' + eltPrefix + 'NumAdults'); var numChildrenElt = $('#' + eltPrefix + 'NumChildren'); var total = 0; if (parseInt(jQuery.trim(numAdultsElt.val())) 0) { total += parseInt(jQuery.trim(numAdultsElt.val())); } // if if (parseInt(jQuery.trim(numChildrenElt.val())) 0) { total += parseInt(jQuery.trim(numChildrenElt.val())); } // if $('#' + eltPrefix + 'TotalInParty').val(total); }); - Dave
[jQuery] crossSlide with preloaded images
Hi, I am using CrossSlide plugin ( http://www.gruppo4.com/~tobia/cross-slide.shtml ) for my website however the images loads slowly. How can i make my images to preload for CrossSlide. Thanks
Re: [jQuery] How to apply blur function to two classes?
The classes should be separated by a ',' (Comma). Please check out the documentation on Selectors, having spaces it looks for the second class within the first class sub-children. That's not what you desire. Try the following code : $(.numAdultsField, .numChildrenField).blur(function() { var id = $(this).attr(id); var eltPrefix = id.substring(0, id.toLowerCase().indexOf (num)).replace(:, \\:); var numAdultsElt = $('#' + eltPrefix + 'NumAdults'); var numChildrenElt = $('#' + eltPrefix + 'NumChildren'); var total = 0; if (parseInt(jQuery.trim(numAdultsElt.val())) 0) { total += parseInt(jQuery.trim(numAdultsElt.val())); } // if if (parseInt(jQuery.trim(numChildrenElt.val())) 0) { total += parseInt(jQuery.trim(numChildrenElt.val())); } // if $('#' + eltPrefix + 'TotalInParty').val(total); }); Thanks Regards, Dhruva Sagar. On Wed, Nov 18, 2009 at 9:29 PM, laredotorn...@zipmail.com laredotorn...@zipmail.com wrote: Hi, I have to apply an onblur function to elements of type numAdultsField or numChildrenField. How do I do that? This isn't working ... $(.numAdultsField .numChildrenField).blur(function() { var id = $(this).attr(id); var eltPrefix = id.substring(0, id.toLowerCase().indexOf (num)).replace(:, \\:); var numAdultsElt = $('#' + eltPrefix + 'NumAdults'); var numChildrenElt = $('#' + eltPrefix + 'NumChildren'); var total = 0; if (parseInt(jQuery.trim(numAdultsElt.val())) 0) { total += parseInt(jQuery.trim(numAdultsElt.val())); } // if if (parseInt(jQuery.trim(numChildrenElt.val())) 0) { total += parseInt(jQuery.trim(numChildrenElt.val())); } // if $('#' + eltPrefix + 'TotalInParty').val(total); }); - Dave
[jQuery] Problems with writing into input fields
Hi, I have a small script which should write me into input hidden fields some values: $('input[name=category_id]').val(c_chosen_id); $('input[name=category_name]').val(cat_name); My problem now is, that it seams, the value get's written, because I can alert it, bit it's not getting written into the source code, because when I submit my form, I miss these values. The strange thing is, that it works sometimes - but not always... Sometimes I can see the changed values wihin firebug, but sometimes, the source isn't changing and after submitting the form, I get an error, that these values hwere missing... WHat can I do?
[jQuery] Disable shortcuts from IEshit
People, how can i disable all Shortcuts from Internet Explorer? I use this plugin, named HotKeys ( http://code.google.com/p/js-hotkeys/ ), for change de shortcuts from browser Menu Bar, to my web application. Example, for access a tab in my app, the user click on ctrl + f On Firefox, is perfect! But on IE, don't change... :( Any Idea? or other Plugin? Thanks for all
Re: [jQuery] Problems with writing into input fields
Hi, There could be a lot of reasons behind the inconsistent behaviour. 1.) Are these inputs being added to the DOM dynamically, i.e. at runtime ? If so have you ensured that your updating the values at the right times ? 2.) Are the fields part of the form that you submit ? At all times ? 3.) Are you sure that the variables c_chosen_id cat_name have been updated appropriately as per your needs before you set the values of the inputs ? Thanks Regards, Dhruva Sagar. On Wed, Nov 18, 2009 at 9:41 PM, heohni heidi.anselstet...@consultingteam.de wrote: Hi, I have a small script which should write me into input hidden fields some values: $('input[name=category_id]').val(c_chosen_id); $('input[name=category_name]').val(cat_name); My problem now is, that it seams, the value get's written, because I can alert it, bit it's not getting written into the source code, because when I submit my form, I miss these values. The strange thing is, that it works sometimes - but not always... Sometimes I can see the changed values wihin firebug, but sometimes, the source isn't changing and after submitting the form, I get an error, that these values hwere missing... WHat can I do?
[jQuery] Validation error placement
I am trying to put all my errors in a div that is the 3rd column. I then want to set there position so it is level with the element. But when I run it I get no error messages Here is my code: errorPlacement: function(error, element) { errordiv=$('.insidePage_error div'); error.appendTo(errordiv); //var offset = $(element).offset();//error.css({'top' : offset.top, 'position' : 'absolute' }); },
[jQuery] Re: Functions
On Nov 18, 7:25 am, Denis Caggiano denisribe...@gmail.com wrote: I'm defined an ID to my table (ID = tb) that have my report, and trying to code like this: $(#tb a).click(function() { alert('Test'); }); #tb a points to link elements that are the direct children of the element with id tb. #tb a points to link elments contained anywhere inside the element with id tb. In other words, your selector will not catch the a tag in this markup: table idtb tbody tr tdSearch/td tda href=http://google.com;Google/a/td /tr /tbody /table This one would: #tb tbody tr td a, but this is much simpler: #tb a. In other words, how can I define that all a in my table triggers an event when clicked? The other thing to make sure you're doing is to call your code once the DOM is loaded, either in the bottom of the page or inside a document.ready block, such as: $(document).ready(function() { $(#tb a).click(function() { alert('Test'); }); }); Cheers, -- Scott
Re: [jQuery] Validation error placement
Take a look at the milk-demo here: http://jquery.bassistance.de/validate/demo/milk The messages are placed in the column next to the input element, that should be close to what you are looking for. Jörn 2009/11/18 Atkinson, Sarah sarah.atkin...@cookmedical.com I am trying to put all my errors in a div that is the 3rd column. I then want to set there position so it is level with the element. But when I run it I get no error messages Here is my code: errorPlacement: function(error, element) { errordiv=$('.insidePage_error div'); error.appendTo(errordiv);//var offset = $(element).offset();//error.css({'top' : offset.top, 'position' : 'absolute' }); },
Re: [jQuery] Simple XML parsing - getting the element tag
What happens when you replace alert (element content is: + $(this).text()); with alert(this.nodeName); ? - Original Message - From: sjames sja...@wmltd.co.uk To: jQuery (English) jquery-en@googlegroups.com Sent: Wednesday, November 18, 2009 3:49 AM Subject: [jQuery] Simple XML parsing - getting the element tag Hi list, I've run up against a small problem processing my ajax response using jQuery. Suppose I have this xml returned from a post or ajax call: ?xml version=1.0 ? !DOCTYPE sebResponse sebResponse element1some text/element1 element2more text/element2 /sebResponse The key thing here is that I don't know what elements will be in sebResponse; it could be as shown, or there could be a hundred different elements. I'd like to iterate through this xml (which is contained in an object called data, returned from the ajax call) to get the element tag-name and the element contents. I can get the contents like this: $(sebResponse, data).children().each(function() { alert (element content is: + $(this).text()); }); This gives me access to the content of each element - some text, more text, but I also need the element name in each case. Can anyone tell me how to get that? best regards, Seb James
[jQuery] Round tripping XML data
I'm hoping some can help me with the following... This is what I want to do... 1) Retrieve an XML data structure from the web server (easy enough using jQuery.ajax()). 2) Interrogate and update the data (again easy enough using standard jQuery methods against the XML DOM). 3) Post the modified XML data back to the server (for storage). Item #3 is the problem. As far as I know the only way to get the XML data back to the server is as a simple string. Is there a recommended way for serialising the XML DOM? I've looked at using: (new XMLSerializer()).serializeToString(xmlData); but the general consensus from looking at other posts is that this does not appear to be consistent/reliable across all browser platforms. Is there another, better way? Thanks.
[jQuery] Re: :gt and :lt don't accept variable as a parameter?
Ah, terminate the string! I'll give that a shot, thanks much for the extra set of eyes. I came up with an alternate solution that works but I like the :gt and :lt way better. Here's what I came up with: var condition_count = $('#filterlist_wrapper ul#col1 li').size(), left_col = condition_count / 2, right_col = condition_count - left_col, column1, column2, right; left_col = Math.ceil(left_col); right_col = Math.floor(right_col); //console.log('left:' + left_col + ' right:' + right_col); column1 = $('#filterlist_wrapper ul#col1'); column2 = $('ul id=col2'); right = $('#filterlist_wrapper ul#col1 li').slice(right_col); column2.html(right).insertAfter(column1); On Nov 17, 6:51 pm, mkmanning michaell...@gmail.com wrote: Try $('#filterlist_wrapper ul li:gt('+left_col+')') On Nov 17, 3:35 pm, Magnificent imightbewrongbutidontthin...@gmail.com wrote: It should read: I'm storing my counts in variables, but it doesn't look like :gt and :lt can accept a VARIABLE value as it's parameter. It works when I put in, say :gt(44), but not :gt(left_col) or lt: (right_col) when those variables are numbers.
Re: [jQuery] Re: Functions
The hint of the day: *The other thing to make sure you're doing is to call your code once* *the DOM is loaded* *---By Scott* ** Im using AJAX and defyning the $(#tb a).click before the DOM is loaded and that was the problem. Here is my $.post now: $.post( 'adm_cobranca_ajax.asp', { mes: $( option:selected, #selMes).val(), ano: $(option:selected, #selAno).val() } , function(data) { $( '#divTable').html(data); $( #load).hide(); $( #tb a).click(function() { alert( this.id); }); }, 'text'); The a tags have now a UID that I can control witch link was clicked. Tks alot.
[jQuery] Loading external page which contains jquery into current page.
Apologies for the previous partial post. I have a page which contains a search form which loads an external page into a content div, the incoming page contains a table where I am trying to use the jquery Datatables plugin. Here is my code: $('#btnSearch').click(function(){ $.post(ss_handlers/search.php, { txtlname: $(input#txtlname).val (), txtfname: $(input#txtfname).val(), txtyeargroup: $ (input#txtyeargroup).val(), txtformgroup: $(input#txtformgroup).val (), txtcommunity: $(input#txtcommunity).val() }, function(data){ $(#content).html(data); }, html); }); This works in IE but not in FF, in FF the table is loaded without the DataTables functionality. What is the best way to do this? Do I put the jquery code in the current doument or the incoming one? Can the incoming document contain the $(document).ready(function()? Are there any gotchas to be aware of when doing this? Artie
[jQuery] hover gets lost when i hover into submenue
hay... my problem is, that the hover gets lost when i hover into submenue... for an example look at this: www.endless-chapter.de -when you hover praxis then, a submenue will be shown, when you hover into the submenu, the text color from praxis turn back into black. i don´t understand why can you help me?
[jQuery] Re: Image Thumbnail Rollover
Don't know where a tutorial might be, perhaps on the jQuery Docs pages. However, if that is the effect you like, why not review the code on the lbc site? script type=text/javascript src=/lbclon/js/master.js? v=27082008 /script
[jQuery] Superfish strange css order on submenu
Hi, Creating following site: http://d2795315.u105.bluefishwebdesign.com/ As you can see, submenus apear but right border loads after everything else which looks weird. I don't know what is causing this. here is the css: /*** ESSENTIAL STYLES ***/ .sf-menu, .sf-menu * { padding:0; list-style: none; margin: 0; } .sf-horizontal { margin-top: 88px; } .sf-menu { line-height:1.0; } .sf-menu ul { position: absolute; top:-999em; width: 6em; /* left offset of submenus need to match (see below) */ margin-top: 88px; } .sf-menu ul li { width: 100%; } .sf-menu li:hover { visibility: inherit; /* fixes IE7 'sticky bug' */ } .sf-menu li { float: left; position: relative; background: #9C3; } .sf-menu a { display:block; position: relative; } .sf-menu li:hover ul, .sf-menu li.sfHover ul { left: 0; top:-5.2em; /* match top ul list item height */ z-index:99; } ul.sf-menu li:hover li ul, ul.sf-menu li.sfHover li ul { top:-999em; } ul.sf-menu li li:hover ul, ul.sf-menu li li.sfHover ul { left: 9em; /* match ul width */ top:-999em; } ul.sf-menu li li:hover li ul, ul.sf-menu li li.sfHover li ul { top:-999em; } ul.sf-menu li li li:hover ul, ul.sf-menu li li li.sfHover ul { left: 9em; /* match ul width */ top:0; } /*** DEMO SKIN ***/ .sf-menu { float: left; } .sf-menu a { padding-bottom: .52em; padding-left: 1.86em; padding-right: 1.86em; padding-top: .5em; text-decoration:none; } .sf-menu a, .sf-menu a:visited { /* visited pseudo selector so IE6 applies text colour*/ color: #FFC; } li.item1, li.item2, li.item3, li.item4, li.item5, li.item6, li.item7, li.item8, li.item9, li.item10 { border-left:2px solid #69c; border-top: 2px solid #69c; border-bottom: 2px solid #69c; } li.item11 { border-left:2px solid #69c; border-top: 2px solid #69c; border-bottom: 2px solid #69c; border-right: 2px solid #69c; padding-right: .08em; } .sf-menu li { background: #9C3; } .sf-menu li li { background: #9C3; border-left:2px solid #69c; border-bottom: 2px solid #69c; border-right: 2px solid #69c; } .sf-menu li li li { background: #9C3; } .sf-menu li:first-child, .sf-menu li.first-child { } .sf-menu li:last-child, .sf-menu li.last-child { } .sf-menu li:hover, .sf-menu li.sfHover, .sf-menu a:focus, .sf-menu a:hover, .sf-menu a:active { background: #69C; outline:0; } .sf-menu li .separator { display: block; padding:.75em .5em; padding-left: 1.2em; padding-right: 10px; text-decoration:none; } /*** arrows **/ .sf-menu a.sf-with-ul { padding-right: 2.25em; min-width: 1px; /* trigger IE7 hasLayout so spans position accurately */ } .sf-sub-indicator { position: absolute; display:block; right: .75em; top:1.05em; /* IE6 only */ width: 10px; height: 10px; text-indent:-999em; overflow: hidden; background: url('../images/arrows-ff.png') no-repeat -10px -100px; /* 8-bit indexed alpha png. IE6 gets solid image only */ } a .sf-sub-indicator { /* give all except IE6 the correct values */ top:.8em; background-position: 0 -100px; /* use translucent arrow for modern browsers*/ } /* apply hovers to modern browsers */ a:focus .sf-sub-indicator, a:hover .sf-sub-indicator, a:active .sf-sub-indicator, li:hover a .sf-sub-indicator, li.sfHover a .sf-sub-indicator { background-position: -10px -100px; /* arrow hovers for modern browsers*/ } /* point right for anchors in subs */ .sf-menu ul .sf-sub-indicator { background-position: -10px 0; } .sf-menu ul a .sf-sub-indicator { background-position: 0 0; } /* apply hovers to modern browsers */ .sf-menu ul a:focus .sf-sub-indicator, .sf-menu ul a:hover .sf-sub-indicator, .sf-menu ul a:active .sf-sub-indicator, .sf-menu ul li:hover a .sf-sub-indicator, .sf-menu ul li.sfHover a .sf-sub-indicator { background-position: -10px 0; /* arrow hovers for modern browsers*/ }
[jQuery] Re: OK newb question... what is jQuery
I don't believe anyone else has answered this so perhaps this will help you. BTW, it's a great site also! http://blog.themeforest.net/tutorials/7-things-i-wish-i-had-known-about-jquery/?utm_source=feedburnerutm_medium=feedutm_campaign=Feed%3A+themeforest+%28In+the+Woods+-+The+ThemeForest+Blog%29 On Nov 17, 9:09 am, MeltingDog a_sherma...@hotmail.com wrote: Before any one says so, yes I am jumping the gun posting here but I have been looking around and i cant find anything that answers the simple question: What isjQuery- my best guess is that its a library of javascript coding that developers download and sit in their site structure and link HTML code off too to do nifty things. Is that right? i.e. can i download one library and then take different HTML and javascript codes and from different developers and theyll work? -- View this message in context:http://old.nabble.com/OK-newb-question...-what-is-jQuery-tp26390570s2... Sent from thejQueryGeneral Discussion mailing list archive at Nabble.com.
[jQuery] Site using jQuery
Hi, We've been using jQuery a lot on our site (mydeco.com) especially for creating our design tools. We're in the process of a complete migration from prototype. Firstly: thanks :-) Secondly: I was going to add us to the list of sites using jQuery (I think we're a pretty good showcase - more tools to come) but it's locked http://docs.jquery.com/Sites_Using_jQuery. Do you know how I can add our site? Thanks, Paul.
[jQuery] jquery json error non well-formed
Hi, I using ajax method with json dataType. My application run but mozilla js console print error message: Errore: non well-formed ... My json string is: {XMax:16.04849609375,XMin:10.55533203125,YMax:45.16953125,YMin: 39.6763671875} I generate it using json-lib for java language. Help me please. Thanks
[jQuery] jQuery and Cycle plugin
Hi, I'm using the almighty jQuery and Cycle plugin to slide an entire div container with various elements inside. However, I would like to exclude an image inside the container from moving. Is there a way of putting this image in a div and exclude it from moving in this container? current code: $(document).ready(function() { $('#headercontainer').cycle({ fx: 'scrollDown', next: '#next2', timeout: 4000, }); }); An example can be viewed here: http://www.laatzoeken.nl/GE/index.php thanks in advance!
[jQuery] Re: jQuery and Cycle plugin
Hi, I also have a question about this jquery, I hope anyone can help out. I use the script to slide an entire div container, with various elements inside. However, I would like a logo image in the top left corner and another image in the bottom left to keep its position. Does anyone know how to exclude an element from moving within the container? thanks in advance!
[jQuery] Copy and manipulate html.
Hallo all. With this line of code i get the html content of a page living in an iframe: var html = $('#indexIframe').contents().find('html'); then I need to append a line in the header and I do it in this way $(html).find('head').prepend(printCss); The problem is that I need to modify the html to send it to a server- side component, but I don't want to see any changes to the html interpreted by the browser. It seems that I need a html.clone() function. Is there anything that could help me? kind regards Massimo
Re: [jQuery] Validation error placement
That's actualy what I was looking at... But I'm not using a table layout. So instead I want them to go into a special error div with class insidePage_error And so I got these 2 lines errordiv=$('.insidePage_error div'); error.appendTo(errordiv); I also tried Errordiv.appendChild(error); but that didn't work either On 11/18/09 12:00 PM, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: Take a look at the milk-demo here: http://jquery.bassistance.de/validate/demo/milk The messages are placed in the column next to the input element, that should be close to what you are looking for. Jörn 2009/11/18 Atkinson, Sarah sarah.atkin...@cookmedical.com I am trying to put all my errors in a div that is the 3rd column. I then want to set there position so it is level with the element. But when I run it I get no error messages Here is my code: errorPlacement: function(error, element) { errordiv=$('.insidePage_error div'); error.appendTo(errordiv); //var offset = $(element).offset();//error.css({'top' : offset.top, 'position' : 'absolute' }); },
[jQuery] Re: jquery json error non well-formed
There's nothing wrong with the json itself, as you can see here http://jsbin.com/uwebe/edit i'd take a guess that the content type of the result is all wrong, it should be: application/json text/plain works as well make sure it's not text/html or something else that the browser could interpret as something else On Nov 18, 8:32 am, sportfantasy luca.santanie...@email.it wrote: Hi, I using ajax method with json dataType. My application run but mozilla js console print error message: Errore: non well-formed ... My json string is: {XMax:16.04849609375,XMin:10.55533203125,YMax:45.16953125,YMin: 39.6763671875} I generate it using json-lib for java language. Help me please. Thanks
Re: [jQuery] Validation error placement
Do you have only a single element? Then use the errorLabelContainer option. Or one for each input? Then you need to make that selector relative to the current input; currently you select the same div for each input. Jörn On Wed, Nov 18, 2009 at 7:29 PM, Atkinson, Sarah sarah.atkin...@cookmedical.com wrote: That’s actualy what I was looking at... But I’m not using a table layout. So instead I want them to go into a special error div with class “insidePage_error” And so I got these 2 lines errordiv=$('.insidePage_error div'); error.appendTo(errordiv); I also tried Errordiv.appendChild(error); but that didn’t work either On 11/18/09 12:00 PM, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: Take a look at the milk-demo here: http://jquery.bassistance.de/validate/demo/milk The messages are placed in the column next to the input element, that should be close to what you are looking for. Jörn 2009/11/18 Atkinson, Sarah sarah.atkin...@cookmedical.com I am trying to put all my errors in a div that is the 3rd column. I then want to set there position so it is level with the element. But when I run it I get no error messages Here is my code: errorPlacement: function(error, element) { errordiv=$('.insidePage_error div'); error.appendTo(errordiv); //var offset = $(element).offset();//error.css({'top' : offset.top, 'position' : 'absolute' }); },
Re: [jQuery] Validation error placement
Yes I have only one container Ok so I will use the errorLabelContainer Now after I do that can I use the offset to alter the css on each of the error labels to be equal to the offset of the offending element? Or should a create custom method that runs after validation runs repositions everything? On 11/18/09 1:55 PM, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: Do you have only a single element? Then use the errorLabelContainer option. Or one for each input? Then you need to make that selector relative to the current input; currently you select the same div for each input. Jörn On Wed, Nov 18, 2009 at 7:29 PM, Atkinson, Sarah sarah.atkin...@cookmedical.com wrote: That's actualy what I was looking at... But I'm not using a table layout. So instead I want them to go into a special error div with class insidePage_error And so I got these 2 lines errordiv=$('.insidePage_error div'); error.appendTo(errordiv); I also tried Errordiv.appendChild(error); but that didn't work either On 11/18/09 12:00 PM, Jörn Zaefferer joern.zaeffe...@googlemail.com http://joern.zaeffe...@googlemail.com wrote: Take a look at the milk-demo here: http://jquery.bassistance.de/validate/demo/milk The messages are placed in the column next to the input element, that should be close to what you are looking for. Jörn 2009/11/18 Atkinson, Sarah sarah.atkin...@cookmedical.com http://sarah.atkin...@cookmedical.com I am trying to put all my errors in a div that is the 3rd column. I then want to set there position so it is level with the element. But when I run it I get no error messages Here is my code: errorPlacement: function(error, element) { errordiv=$('.insidePage_error div'); error.appendTo(errordiv); //var offset = $(element).offset();//error.css({'top' : offset.top, 'position' : 'absolute' }); },
[jQuery] UI Dialog: Need the ID of the clicked button...
Because I am using the CLASS of the button to open UI Dialog (as opposed to the ID), how can I pass it the ID (or any data, for that matter)? I need to pass the ID of the button to dialog so I know which row to apply the actions of the dialog to. var opt = { autoOpen: false, modal: true, buttons: { 'Show ID': function() { alert(ID: +id); // I want to at least get this far }, Cancel: function() { $(this).dialog('close'); } }, }; $(#new).dialog(opt); $('a.button').click(function() { // Because I am using CLASS not ID to open UI Dialog (I have to; I am using this for several rows) var id = $(this).attr('id').split('_')[1]; // This is the ID. How can I pass it to UI Dialog? $('#new').dialog('open'); });
Re: [jQuery] Simple XML Parsing Question
Here's an old, but good, tutorial on xml and jQuery: http://www.bennadel.com/blog/1054-jQuery-Demo-Working-With-XML-Documents.htm ...or if you want to make the code you have work you can cheat and just change the name of one of the two 'id's in your xml... ;) Wil On Wed, Nov 18, 2009 at 1:18 AM, Joe Moore joe.lynn.mo...@gmail.com wrote: Instead of find, use children? On Nov 17, 2009 2:56 PM, Joe joecel...@gmail.com wrote: I have been banging my head against the wall and searching for answers for the past week, so any help or direction would be appreciated. I am sure that I am missing something obvious. I have some XML that looks like this: ?xml version=1.0 encoding=UTF-8? customMessageList CustomMessage id181/id nameFirst Message/name customMessageImage id135/id nameSample_img.png/name contentTypeimage/png/contentType modifiedOn2009-08-25 11:25:28.34/modifiedOn /customMessageImage /CustomMessage /customMessageList And an AJAX call that looks like this: $.ajax({ type: GET, url: myURL, success: function(xml) { $(xml).find('CustomMessage').each(function(){ var id_text = (this).find('id').text(); var name_text = $(this).find('name').text(); var contentType_text = $(this).find('contentType').text(); }); //close each( } } }); When i run this code, the id and name variables have all the id/name nodes in them. I only want the id/name for the child node. the contentType variable works find (but there is only one instance. Any ideas on how to fix this? I am at my wits end. thx, Joe C
[jQuery] Re: UI Dialog: Need the ID of the clicked button...
Example i whipped up quick: http://jsbin.com/acucu/edit On Nov 18, 2:05 pm, discern cap...@gmail.com wrote: Because I am using the CLASS of the button to open UI Dialog (as opposed to the ID), how can I pass it the ID (or any data, for that matter)? I need to pass the ID of the button to dialog so I know which row to apply the actions of the dialog to. var opt = { autoOpen: false, modal: true, buttons: { 'Show ID': function() { alert(ID: +id); // I want to at least get this far }, Cancel: function() { $(this).dialog('close'); } }, }; $(#new).dialog(opt); $('a.button').click(function() { // Because I am using CLASS not ID to open UI Dialog (I have to; I am using this for several rows) var id = $(this).attr('id').split('_')[1]; // This is the ID. How can I pass it to UI Dialog? $('#new').dialog('open'); });
[jQuery] Re: UI Dialog: Need the ID of the clicked button...
Solved my own problem (again). For anyone else with a similar question, just add a hidden field to your dialog form: div id=new ... input type=hidden value= id=id / /div Then, in the click event, add: $(#id).val(id); after the dialog('open') line. The final result is: var opt = { autoOpen: false, modal: true, buttons: { 'Show ID': function() { var id = $(#id).val(); alert(ID: +id); // This works! }, Cancel: function() { $(this).dialog('close'); } }, }; $(#new).dialog(opt); $('a.plu').click(function() { var id = $(this).attr('id').split('_')[1]; $('#new').dialog('open'); $(#id).val(id); });
[jQuery] Re: UI Dialog: Need the ID of the clicked button...
Use a global. Makes more sense than my solution. Thanks. I always forget about globals.
Re: [jQuery] Problems with writing into input fields
Without seeing more code it's hard to know where you're falling down... Here are a couple stabs for you: 1. Add a console.log('id: ' + c_chosen_id); and console.log('cat: ' + cat_name); into the mix and see if that's working, maybe the variables aren't always set properly... (Remember to remove these when you're done debugging.) 2. Try simplifying your code by just using the id: $('#category_id').val(c_chosen_id); 3. Point us to a sample page running the code if neither of these is helpful... Wil On Wed, Nov 18, 2009 at 8:11 AM, heohni heidi.anselstet...@consultingteam.de wrote: Hi, I have a small script which should write me into input hidden fields some values: $('input[name=category_id]').val(c_chosen_id); $('input[name=category_name]').val(cat_name); My problem now is, that it seams, the value get's written, because I can alert it, bit it's not getting written into the source code, because when I submit my form, I miss these values. The strange thing is, that it works sometimes - but not always... Sometimes I can see the changed values wihin firebug, but sometimes, the source isn't changing and after submitting the form, I get an error, that these values hwere missing... WHat can I do?
[jQuery] Adding some buttons and callbacks
This is probably a very basic question and I know how to do it using plain DOM but would like to learn the JQuery way of doing it. After identifying the set of nodes using the appropriate JQuery selector, I would like to append a textarea, Save and Cancel button to each node with appropriate callback functions attached to the buttons to store values into a database. If the database has a value stored already, it should be pre-populated in the textarea. I can handle the back-end interaction parts, I just wanted to know the best practice for doing this sort of thing as far as JQuery is concerned. Thanks
[jQuery] Re: Get the td below and above
Hi, Assuming your table has the same number of tds in each tr. You can try this approach: First find the position of the selected td in its tr. Then find the prev() or next() tr. Then select the td with the same position in that tr. Try this: $('td').click(function(){ var trparent = $(this).parent('tr'); var position = $('td', $(this).parent('tr')).index(this); $('td:eq('+ position +')', $(trparent).prev('tr')).css ('color','white'); $('td:eq('+ position +')', $(trparent).next('tr')).css ('color','green'); }); Paul On Nov 18, 11:13 am, Jan jha...@gmail.com wrote: Hi there, I'm new to jQuery and was looking for a way to get a table cell above or below the current one. What I mean is a function like .prev() or .next() but those only help me getting the cell to the left or to the right.
Re: [jQuery] Re: Functions
Have you tried simply doing: $(#tb a).click(function() { alert('Test'); }); Depending on the table's code will break your heart... Wil On Wed, Nov 18, 2009 at 4:25 AM, Denis Caggiano denisribe...@gmail.comwrote: Hi Greg, I'm defined an ID to my table (ID = tb) that have my report, and trying to code like this: $(#tb a).click(function() { alert('Test'); }); But it doesnt working. In other words, how can I define that all a in my table triggers an event when clicked? Tks
Re: [jQuery] Validation error placement
Ok so I switched to errorLabelContainer: .insidePage_error, But that div still isn't getting any errors into it. On 11/18/09 1:55 PM, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: Do you have only a single element? Then use the errorLabelContainer option. Or one for each input? Then you need to make that selector relative to the current input; currently you select the same div for each input. Jörn On Wed, Nov 18, 2009 at 7:29 PM, Atkinson, Sarah sarah.atkin...@cookmedical.com wrote: That's actualy what I was looking at... But I'm not using a table layout. So instead I want them to go into a special error div with class insidePage_error And so I got these 2 lines errordiv=$('.insidePage_error div'); error.appendTo(errordiv); I also tried Errordiv.appendChild(error); but that didn't work either On 11/18/09 12:00 PM, Jörn Zaefferer joern.zaeffe...@googlemail.com http://joern.zaeffe...@googlemail.com wrote: Take a look at the milk-demo here: http://jquery.bassistance.de/validate/demo/milk The messages are placed in the column next to the input element, that should be close to what you are looking for. Jörn 2009/11/18 Atkinson, Sarah sarah.atkin...@cookmedical.com http://sarah.atkin...@cookmedical.com I am trying to put all my errors in a div that is the 3rd column. I then want to set there position so it is level with the element. But when I run it I get no error messages Here is my code: errorPlacement: function(error, element) { errordiv=$('.insidePage_error div'); error.appendTo(errordiv); //var offset = $(element).offset();//error.css({'top' : offset.top, 'position' : 'absolute' }); },
[jQuery] show/hide div on select change
I am trying to have a div show and hide based on the value of a select list. I have looked at a number of examples, but can't seem to get it to work. Would appreciate someone taking a look at what I have and giving me any advice. script $(document).ready(function() { $('div.textfield1').hide(); ('#id_status').change(function() { if ($(#id_status).val() == 6){ $('div.textfield1').show(); } else{ $('div.textfield1').hide(); } }); }); /script plabel for=id_statusStatus:/label select name=status id=id_status option value=1New/option option value=2In Review/option option value=3Working On/option option value=4Elevated/option option value=5Approved/option option value=6Deferred/option option value=7Denied/option option value=8Duplicate/option option value=9Completed/option option value=10Needs more information/option /select/p div class=textfield1 labeltest input type=text name=text id=text / /label /div
Re: [jQuery] show/hide div on select change
You're missing a $ on this line: ('#id_status').change(function() { Change to: $('#id_status').change(function() { unsolicited word of advice... run firebug :) On Wed, Nov 18, 2009 at 11:44 AM, mtuller mitul...@gmail.com wrote: I am trying to have a div show and hide based on the value of a select list. I have looked at a number of examples, but can't seem to get it to work. Would appreciate someone taking a look at what I have and giving me any advice. script $(document).ready(function() { $('div.textfield1').hide(); ('#id_status').change(function() { if ($(#id_status).val() == 6){ $('div.textfield1').show(); } else{ $('div.textfield1').hide(); } }); }); /script plabel for=id_statusStatus:/label select name=status id=id_status option value=1New/option option value=2In Review/option option value=3Working On/option option value=4Elevated/option option value=5Approved/option option value=6Deferred/option option value=7Denied/option option value=8Duplicate/option option value=9Completed/option option value=10Needs more information/option /select/p div class=textfield1 labeltest input type=text name=text id=text / /label /div -- Charlie Griefer http://charlie.griefer.com/ I have failed as much as I have succeeded. But I love my life. I love my wife. And I wish you my kind of success.
[jQuery] custom error message
How do I return a custom message based on an if statement in the addMethod function? $.validator.addMethod(validateBaseDepth, function(value, element, params) { var blnImperialUnits = ($ (#RequireBaseDepthUnitImperial:checked).val() == imperial ? true : false); var intMinImperialValue = 0; var intMaxImperialValue = 36; var intMinMetricValue = 0; var intMaxMetricValue = 915; if (value != $(#RequireBaseDepthTextBox).val()) return false;// || The base depth specified must be a whole number.; else if (isNaN(value) == true) return false;// || The base depth specified has an invalid value.; else { if (blnImperialUnits == true (value intMinImperialValue || value intMaxImperialValue)) return false || value == (The base depth specified has an invalid value. Please use a number between + intMinImperialValue + and + intMaxImperialValue + inches.); else if (blnImperialUnits == false (value intMinMetricValue || value intMaxMetricValue)) return false || value == (The base depth specified has an invalid value. Please use a number between + intMinMetricValue + and + intMaxMetricValue + millimeters.); } return true; }, jQuery.format({0}, {1})); id like to return the message to be displayed Thanks
[jQuery] Re: show/hide div on select change
Thanks. On Nov 18, 1:50 pm, Charlie Griefer charlie.grie...@gmail.com wrote: You're missing a $ on this line: ('#id_status').change(function() { Change to: $('#id_status').change(function() { unsolicited word of advice... run firebug :) On Wed, Nov 18, 2009 at 11:44 AM, mtuller mitul...@gmail.com wrote: I am trying to have a div show and hide based on the value of a select list. I have looked at a number of examples, but can't seem to get it to work. Would appreciate someone taking a look at what I have and giving me any advice. script $(document).ready(function() { $('div.textfield1').hide(); ('#id_status').change(function() { if ($(#id_status).val() == 6){ $('div.textfield1').show(); } else{ $('div.textfield1').hide(); } }); }); /script plabel for=id_statusStatus:/label select name=status id=id_status option value=1New/option option value=2In Review/option option value=3Working On/option option value=4Elevated/option option value=5Approved/option option value=6Deferred/option option value=7Denied/option option value=8Duplicate/option option value=9Completed/option option value=10Needs more information/option /select/p div class=textfield1 labeltest input type=text name=text id=text / /label /div -- Charlie Grieferhttp://charlie.griefer.com/ I have failed as much as I have succeeded. But I love my life. I love my wife. And I wish you my kind of success.
[jQuery] validation: how do I call a function to perform after a validation is done?
Do I have to create a custom method and stick a function in there?
[jQuery] Re: validation: how do I call a function to perform after a validation is done?
It depends on your method of validation. Here is the form/validation system I use for my contact form. Hope this helps! script type=text/javascript src=js/jquery-1.3.2.min.js/script script type=text/javascript src=js/jquery.validate.js/script script type=text/javascript src=js/jquery.form.js/script script type=text/javascript $(document).ready(function() { $(#contactForm).validate({ rules: { fullname: { required: true, minlength: 2 }, email: { required: true, email: true }, company: { required: true, minlength: 2 }, phone: { required: true, minlength: 2 }, }, messages: { fullname: 'span class=errorPlease enter your bfull name/b./ span', email: 'span class=errorPlease enter a valid bemail address/ b./span', company: 'span class=errorPlease enter your bcompany/b./ span', phone: 'span class=errorPlease enter your bphone number/b./ span' }, submitHandler: function(form) { $('#contactForm').ajaxSubmit({ resetForm: true, target: '#success', success: function() { $(#success).fadeIn('slow').fadeTo(5000, 1).fadeOut('slow'); } }); } }); }); /script form id=contactForm method=POST action=process.php //FORM GOES HERE /form On Nov 18, 3:08 pm, Atkinson, Sarah sarah.atkin...@cookmedical.com wrote: Do I have to create a custom method and stick a function in there?
Re: [jQuery] Re: validation: how do I call a function to perform after a validation is done?
I want the function to trigger when there are errors it's to alter the position of both the errors and other elements on the page. So I got the function to fire but I can't seem to changes the css on the error boxes. $('label .error').css({'left' : basePossitionOffset.left}); Does not work. I should be able to alter the error messages just like anyother element in the DOM right? On 11/18/09 3:34 PM, StephenJacob turnstylecreat...@gmail.com wrote: It depends on your method of validation. Here is the form/validation system I use for my contact form. Hope this helps! script type=text/javascript src=js/jquery-1.3.2.min.js/script script type=text/javascript src=js/jquery.validate.js/script script type=text/javascript src=js/jquery.form.js/script script type=text/javascript $(document).ready(function() { $(#contactForm).validate({ rules: { fullname: { required: true, minlength: 2 }, email: { required: true, email: true }, company: { required: true, minlength: 2 }, phone: { required: true, minlength: 2 }, }, messages: { fullname: 'span class=errorPlease enter your bfull name/b./ span', email: 'span class=errorPlease enter a valid bemail address/ b./span', company: 'span class=errorPlease enter your bcompany/b./ span', phone: 'span class=errorPlease enter your bphone number/b./ span' }, submitHandler: function(form) { $('#contactForm').ajaxSubmit({ resetForm: true, target: '#success', success: function() { $(#success).fadeIn('slow').fadeTo(5000, 1).fadeOut('slow'); } }); } }); }); /script form id=contactForm method=POST action=process.php //FORM GOES HERE /form On Nov 18, 3:08 pm, Atkinson, Sarah sarah.atkin...@cookmedical.com wrote: Do I have to create a custom method and stick a function in there?
[jQuery] Re: Simple XML Parsing Question
thx, i tried that. whether i do a find or a children, it still returns both id's. you can try it with a simple app that loads that XML. it's really odd. i still haven't got a solution. On Nov 18, 2:12 pm, Wil Everts wileve...@gmail.com wrote: Here's an old, but good, tutorial on xml and jQuery:http://www.bennadel.com/blog/1054-jQuery-Demo-Working-With-XML-Docume... ...or if you want to make the code you have work you can cheat and just change the name of one of the two 'id's in your xml... ;) Wil On Wed, Nov 18, 2009 at 1:18 AM, Joe Moore joe.lynn.mo...@gmail.com wrote: Instead of find, use children? On Nov 17, 2009 2:56 PM, Joe joecel...@gmail.com wrote: I have been banging my head against the wall and searching for answers for the past week, so any help or direction would be appreciated. I am sure that I am missing something obvious. I have some XML that looks like this: ?xml version=1.0 encoding=UTF-8? customMessageList CustomMessage id181/id nameFirst Message/name customMessageImage id135/id nameSample_img.png/name contentTypeimage/png/contentType modifiedOn2009-08-25 11:25:28.34/modifiedOn /customMessageImage /CustomMessage /customMessageList And an AJAX call that looks like this: $.ajax({ type: GET, url: myURL, success: function(xml) { $(xml).find('CustomMessage').each(function(){ var id_text = (this).find('id').text(); var name_text = $(this).find('name').text(); var contentType_text = $(this).find('contentType').text(); }); //close each( } } }); When i run this code, the id and name variables have all the id/name nodes in them. I only want the id/name for the child node. the contentType variable works find (but there is only one instance. Any ideas on how to fix this? I am at my wits end. thx, Joe C
[jQuery] Re: validation: how do I call a function to perform after a validation is done?
Hmm, i'm not really sure how to pull that off. I would look into the showErrors option or possibly the Valid function. http://docs.jquery.com/Plugins/Validation/validate http://docs.jquery.com/Plugins/Validation/valid Good luck and let us know how things turn out for ya! On Nov 18, 3:47 pm, Atkinson, Sarah sarah.atkin...@cookmedical.com wrote: I want the function to trigger when there are errors it's to alter the position of both the errors and other elements on the page. So I got the function to fire but I can't seem to changes the css on the error boxes. $('label .error').css({'left' : basePossitionOffset.left}); Does not work. I should be able to alter the error messages just like anyother element in the DOM right? On 11/18/09 3:34 PM, StephenJacob turnstylecreat...@gmail.com wrote: It depends on your method of validation. Here is the form/validation system I use for my contact form. Hope this helps! script type=text/javascript src=js/jquery-1.3.2.min.js/script script type=text/javascript src=js/jquery.validate.js/script script type=text/javascript src=js/jquery.form.js/script script type=text/javascript $(document).ready(function() { $(#contactForm).validate({ rules: { fullname: { required: true, minlength: 2 }, email: { required: true, email: true }, company: { required: true, minlength: 2 }, phone: { required: true, minlength: 2 }, }, messages: { fullname: 'span class=errorPlease enter your bfull name/b./ span', email: 'span class=errorPlease enter a valid bemail address/ b./span', company: 'span class=errorPlease enter your bcompany/b./ span', phone: 'span class=errorPlease enter your bphone number/b./ span' }, submitHandler: function(form) { $('#contactForm').ajaxSubmit({ resetForm: true, target: '#success', success: function() { $(#success).fadeIn('slow').fadeTo(5000, 1).fadeOut('slow'); } }); } }); }); /script form id=contactForm method=POST action=process.php //FORM GOES HERE /form On Nov 18, 3:08 pm, Atkinson, Sarah sarah.atkin...@cookmedical.com wrote: Do I have to create a custom method and stick a function in there?
[jQuery] Re: Nested Accordion
Hi Adriana, I am almost done with it. I do have one question. I am trying to remove Underline from all text in the accordion. I am using text- decoration:none. It does remove it from the first and the second level but the third level of nesting still contains underline. If I do an inline style of text-decoration: none, it works out. However, is there a way to do it without using inline style. Here is my CSS. I have removed everything from your CSS I did not need. If you have time to go through it and suggest something, I will appreciate it. If not, thanks a lot. you have helped me enough. style type='text/css' /* --- Content Structure --- */ #nested-acc{ width:165px; display:inline; padding-bottom:5px; position: relative; overflow:hidden; } .slide { position:relative; top:0; right:0; float:left; width:100%; padding-bottom:2em; z-index:9 } /* --- */ h3, h4, h5 a, h6 a, h2.h3 {padding:3px 10px} h4, h5, h6 {font-weight:700} /* --- */ .accordion, ul.accordion div ul {margin:0; padding:0 0px; width: 165px;} ul.accordion ul {margin:0; padding:0 0 0 20px;} .accordion li {list-style-type:none; width:165px;} /*Being Added by Akbar Ehsan*/ .accordion .outer {border:1px solid #e0e0e0; border-width:0 1px 1px} .accordion .inner {padding:10px} div.accordion .inner {padding:10px 20px} .accordion .h {padding-top:.3em} a.trigger {text-decoration:none; padding-left:20px; background-image: url(/development/jquery/images/plus.gif); background-repeat: no- repeat; background-position: 0 50%; font-weight:700} a.trigger.open {background-image: url(/development/jquery/images/ minus.gif)} #main a.trigger {border-width:1px} #main a.trigger.open {background-color:#f0f0f0;} /style Regards, AKbar On Nov 16, 8:31 pm, Adriana adipa...@yahoo.com wrote: Sorry, my mistake: The variable 'containerID' in the script is the ID of the closest named container of the accordion. In the above example containerID = #rightcol.
[jQuery] Re: Nested Accordion
Never mind. I was missing something obvious. I added another style: .accordion a{text-decoration:none;} and it is all good. Once I have my simple nested accordion online in production, I will let you know. Thanks, Akbar On Nov 18, 4:34 pm, Akbar akbareh...@gmail.com wrote: Hi Adriana, I am almost done with it. I do have one question. I am trying to remove Underline from all text in the accordion. I am using text- decoration:none. It does remove it from the first and the second level but the third level of nesting still contains underline. If I do an inline style of text-decoration: none, it works out. However, is there a way to do it without using inline style. Here is my CSS. I have removed everything from your CSS I did not need. If you have time to go through it and suggest something, I will appreciate it. If not, thanks a lot. you have helped me enough. style type='text/css' /* --- Content Structure --- */ #nested-acc{ width:165px; display:inline; padding-bottom:5px; position: relative; overflow:hidden; } .slide { position:relative; top:0; right:0; float:left; width:100%; padding-bottom:2em; z-index:9 } /* --- */ h3, h4, h5 a, h6 a, h2.h3 {padding:3px 10px} h4, h5, h6 {font-weight:700} /* --- */ .accordion, ul.accordion div ul {margin:0; padding:0 0px; width: 165px;} ul.accordion ul {margin:0; padding:0 0 0 20px;} .accordion li {list-style-type:none; width:165px;} /*Being Added by Akbar Ehsan*/ .accordion .outer {border:1px solid #e0e0e0; border-width:0 1px 1px} .accordion .inner {padding:10px} div.accordion .inner {padding:10px 20px} .accordion .h {padding-top:.3em} a.trigger {text-decoration:none; padding-left:20px; background-image: url(/development/jquery/images/plus.gif); background-repeat: no- repeat; background-position: 0 50%; font-weight:700} a.trigger.open {background-image: url(/development/jquery/images/ minus.gif)} #main a.trigger {border-width:1px} #main a.trigger.open {background-color:#f0f0f0;} /style Regards, AKbar On Nov 16, 8:31 pm, Adriana adipa...@yahoo.com wrote: Sorry, my mistake: The variable 'containerID' in the script is the ID of the closest named container of the accordion. In the above example containerID = #rightcol.
[jQuery] non well-formed
Hi, I'm italian developer. I have a problem. I develope my simple web application using jquery for ajax call. My Servlet return json string generated with json-lib... for example: {descrizione:Questa è la descrizione del computer,disponibile:false,id:1,nome:Computer,prezzo: 123.456} My jsp page contains a simple nutton that call follow js function: $.ajax({ url: json?method=prodotti, global: false, type: POST, dataType: json, success: function(msg){ alert(msg); } }); Application run correcty... Only problem is mozilla/firefox browser... In js console appears this message: Errore: non well-formed File sorgente: ... Riga: 1, Colonna: 1 Codice sorgente: {descrizione:Questa ? la descrizione del computer,disponibile:false,id:1,nome:Computer,prezzo: 123.456} Why? How can I solve it? Sorry for my english. I hope solve my problem Thanks Luca
[jQuery] HTML Template and including jquery
Hi, I have a question more about how to structure my code when using JQuery. I have this master HTML template that contains my site header and footer and in between is the dynamic area or page layout area. This area contains my main user interface. Currently in this master template I have something like this. html head script type=text/javascript src=js/jquery-1.3.2.min.js/script script type=text/javascript src=js/app.js/script /head body !-- Common Header -- !-- Dynamic area here / Page Layout essentially -- !-- Common Footer -- /body /html Within app.js I define: $(document).ready(function(){ // code to execute when the document is loaded.. }); This does work, but say in my ready() function call there is an element on the page that isn't being displayed and I try to reference it? I presume I will get an error My concern is by including app.js in the master template there is a good chance it may reference divs, tables, or whatever that don't exist because they are not part of the page that the user is on. Since the master template is the only HTML file I have, it's the only file that actually has a head/head section so that is why I'm putting: script type=text/javascript src=js/app.js/script, in the head section Since my page layout can be different depending on which page I'm on, there is a chance that any code I define in app.js may try to reference divs or something that aren't part of the page layout. So does it make more sense to include the relevant javascript file with the page layout? If I do it, then script type=text/javascript src=js/app.js/script will not be in the head tag, but would appear within the body tag. Hope that makes sense. Any help appreciated -Westside
RE: [jQuery] Konami Code :]
What is this? Something unexpected happens when someone presses designated keys? Easter Eggs? Got an example site? Rick -Original Message- From: Marc Henson [mailto:m...@marchenson.co.uk] Sent: Wednesday, November 18, 2009 5:35 AM To: jquery-en@googlegroups.com Subject: Re: [jQuery] Konami Code :] Can I just say Brilliant!! I think this will probably make it's way onto my site/s at some point fairly soon!! Thanks On 16 Nov 2009, at 21:03, Ash wrote: Every body loves a little treat in their websites... Well I believe jQuery holds the PERFECT javascript library for doing the Konami Code. A fan of Konami, and having such a cool little hidden feature to your websites, I decided i'd share my code with the world, or at least those people who'd like it.. Just like the PHP logo change, creativity with this little beauty will keep your mind going for ever ;) [code] $(function (){ var press = 0, keys = [38, 38, 40, 40, 37, 39, 37, 39, 66, 65]; $(document).keydown(function (e){ if (e.which == keys[press]) press++; else press = 0; if (press == keys.length) (function (){ // your little treat... }); }); }); [/code]
[jQuery] Re: Konami Code :]
Got an example site? www.facebook.com http://www.google.com/search?q=facebook+konami+code On Nov 18, 5:56 pm, Rick Faircloth r...@whitestonemedia.com wrote: What is this? Something unexpected happens when someone presses designated keys? Easter Eggs? Got an example site? Rick -Original Message- From: Marc Henson [mailto:m...@marchenson.co.uk] Sent: Wednesday, November 18, 2009 5:35 AM To: jquery-en@googlegroups.com Subject: Re: [jQuery] Konami Code :] Can I just say Brilliant!! I think this will probably make it's way onto my site/s at some point fairly soon!! Thanks On 16 Nov 2009, at 21:03, Ash wrote: Every body loves a little treat in their websites... Well I believe jQuery holds the PERFECT javascript library for doing the Konami Code. A fan of Konami, and having such a cool little hidden feature to your websites, I decided i'd share my code with the world, or at least those people who'd like it.. Just like the PHP logo change, creativity with this little beauty will keep your mind going for ever ;) [code] $(function (){ var press = 0, keys = [38, 38, 40, 40, 37, 39, 37, 39, 66, 65]; $(document).keydown(function (e){ if (e.which == keys[press]) press++; else press = 0; if (press == keys.length) (function (){ // your little treat... }); }); }); [/code]
[jQuery] jQuery plugin not working in Firefox?!
Hi! I'm using a jQuery plugin called DragScroll (http://plugins.jquery.com/ files/jquery.dragscroll.js.txt) so I can drag and scroll just like in google maps. This works fine in Safari and Opera, but it's not working in Firefox You can find the site I'm working on here: http://bit.ly/297LCa If you check both Firefox and Safari you will see the problem: I can't drag in Firefox... There is also another very similar plugin called ScrollDrag (http:// plugins.jquery.com/files/jquery.scrolldrag.js.txt), but I have the same problem with this plugin too! Not working in Firefox.. Does anyone know why this is happening? Maybe I've done something wrong in my html document? Could really need some help here! cheers
RE: [jQuery] Re: Konami Code :]
Thanks! -Original Message- From: MorningZ [mailto:morni...@gmail.com] Sent: Wednesday, November 18, 2009 6:05 PM To: jQuery (English) Subject: [jQuery] Re: Konami Code :] Got an example site? www.facebook.com http://www.google.com/search?q=facebook+konami+code On Nov 18, 5:56 pm, Rick Faircloth r...@whitestonemedia.com wrote: What is this? Something unexpected happens when someone presses designated keys? Easter Eggs? Got an example site? Rick -Original Message- From: Marc Henson [mailto:m...@marchenson.co.uk] Sent: Wednesday, November 18, 2009 5:35 AM To: jquery-en@googlegroups.com Subject: Re: [jQuery] Konami Code :] Can I just say Brilliant!! I think this will probably make it's way onto my site/s at some point fairly soon!! Thanks On 16 Nov 2009, at 21:03, Ash wrote: Every body loves a little treat in their websites... Well I believe jQuery holds the PERFECT javascript library for doing the Konami Code. A fan of Konami, and having such a cool little hidden feature to your websites, I decided i'd share my code with the world, or at least those people who'd like it.. Just like the PHP logo change, creativity with this little beauty will keep your mind going for ever ;) [code] $(function (){ var press = 0, keys = [38, 38, 40, 40, 37, 39, 37, 39, 66, 65]; $(document).keydown(function (e){ if (e.which == keys[press]) press++; else press = 0; if (press == keys.length) (function (){ // your little treat... }); }); }); [/code]
[jQuery] Re: Remove a tab that contains some element
Sorry for the delay. 1: More details: I created a page with tabs, and in some tabs I might have some elements that can produce events by them selfs. As a reaction to some events in some cases, I needed to close a tab. I could not now the index of the tab that was containing the obect that produced the event. BUT: I realised that my object is allways a child element of the div that is a tab panel, so the tab index can be obtained searching the index of the object's parent. 2: I was looking for this code: var tabIndex = $(#tabsdiv).index(targetObject.parentNode); if (tabIndex != undefined tabIndex 0) { $(#tabs).tabs('remove', tabIndex); $(#tabs).tabs('select', 0); } Thanks for the interest.
Re: Re[jQuery] move a tab that contains some element
Show you another tabs plugin http://www.etmvc.cn/project/show/63 http://www.etmvc.cn/project/show/63 To remove a tab you can invoke $('#tab').tabs('close',title). Note: close a tab only pass the tab's title, not remember the index of the tab. cPetru wrote: Hello I created some tabs dinamically and now I need to remove one, triggered by an element inside a tab (not tab-header, not the currently selected tab). I can not find a way to determine the index of the tab that contains a particular element (let's say table#Streets). Thank you very much. -- View this message in context: http://old.nabble.com/Remove-a-tab-that-contains-some-element-tp26346674s27240p26418514.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
Re: [jQuery] UI Dialog: Need the ID of the clicked button...
Using the data method is a good idea. $.data($('#new')[0],'id',value) discern wrote: Use a global. Makes more sense than my solution. Thanks. I always forget about globals. -- View this message in context: http://old.nabble.com/UI-Dialog%3A-Need-the-ID-of-the-clicked-button...-tp26413745s27240p26418614.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: non well-formed
I think you must encapsulate false and numbers in quotes... and treat msg like an object (msg.descrizione, msg. disponibile... etc.) On 18 nov, 17:43, sportfantasy luca.santanie...@email.it wrote: Hi, I'm italian developer. I have a problem. I develope my simple web application using jquery for ajax call. My Servlet return json string generated with json-lib... for example: {descrizione:Questa è la descrizione del computer,disponibile:false,id:1,nome:Computer,prezzo: 123.456} My jsp page contains a simple nutton that call follow js function: $.ajax({ url: json?method=prodotti, global: false, type: POST, dataType: json, success: function(msg){ alert(msg); } }); Application run correcty... Only problem is mozilla/firefox browser... In js console appears this message: Errore: non well-formed File sorgente: ... Riga: 1, Colonna: 1 Codice sorgente: {descrizione:Questa ? la descrizione del computer,disponibile:false,id:1,nome:Computer,prezzo: 123.456} Why? How can I solve it? Sorry for my english. I hope solve my problem Thanks Luca
[jQuery] FadeIn Text
Hey - hope you are all well. I have a simply Jquery script which acts as a rollover - on mouseover if fades the opacity, and then back again. Heres the code: $(document).ready(function() { $(.menuBlue).hover(function() { $(this).fadeTo(fast,0.4); }, function() { $(this).fadeTo(fast,1); } ); }); Works great - except in IE8. On one site it doesnt work at all - on another it strangely works but seemingly removes the bold on the text. Has anyone any ideas? Example at http://77.68.37.37/index.aspx Thanks! Peter