[jQuery] Re: Need Open/Shut Function
If you're going to have the same code in more than one place, you might consider creating a function for that. Something like this maybe: function mouseExpand(source,target) { $('#' + source).hover(function(){ $('#' + target).show(); },function(){ $('#' + target).hide(); }); } and you'd call it like this: mouseExpand('MSFree','menu2'); andy _ From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of David Blomstrom Sent: Wednesday, December 10, 2008 2:04 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Need Open/Shut Function Yes, it does work. I just have a couple follow up questions. When I first load the page, the element that's supposed to be hidden is displayed. Is there a way to modify it so that it doesn't display until someone mouses over the yellow MS-Free thingy? I put a working example online at http://www.geobop.org/Test.php Also, suppose I wanted to add a similar function, named Stuff, for example. Would I just add a separate script, as below?: $(\'#MSFree\').hover(function(){ // do something on mouse over $(\'#menu2\').show(); },function(){ // do something on mouse out $(\'#menu2\').hide(); }); $(\'#Stuff\').hover(function(){ // do something on mouse over $(\'#menu3\').show(); },function(){ // do something on mouse out $(\'#menu3\').hide(); }); Thanks. On Wed, Dec 10, 2008 at 11:39 AM, David Blomstrom [EMAIL PROTECTED] wrote: No, it isn't working. I deleted the JavaScript that previously controlled it, then I looked for any CSS styles that might have been interfering with it. I looked at the page with the Firebug console, and it doesn't report any errors. I know I'm conneced to my JQuery scripts because some JQuery table sorting functions on the same page are working. I'll go back and take a fresh look at it in a moment. Thanks. On Wed, Dec 10, 2008 at 11:14 AM, Hector Virgen [EMAIL PROTECTED] wrote: That looks good, did it work? -Hector On Wed, Dec 10, 2008 at 10:57 AM, David Blomstrom [EMAIL PROTECTED] wrote: So should the code in my head section look something like this?: script src='.$BaseURL.'/1A/js/jquery-1.2.6.min.js type=text/javascript/script script src='.$BaseURL.'/1A/js/tablesorter/jquery.tablesorter.js type=text/javascript/script script language=JavaScript type=text/JavaScript $(document).ready(function() { $(#myTable).tablesorter({ widgets: [\'zebra\']} ); $(\'#MSFree\').mouseover(function() { $(\'#menu2\').show(); }); $(\'#MSFree\').mouseout(function() { $(\'#menu2\').hide(); }); } ); /script ...or do I need to place the code you gave me in the body somehow? On Wed, Dec 10, 2008 at 10:51 AM, Hector Virgen [EMAIL PROTECTED] wrote: The .show() and .hide() functions are on-demand functions -- they'll happen immediately when the code is called. What you need to do is observe the user's actions and show/hide the div based on what they are doing. For that, you can use .mouseover() and .mouseout with callback functions. The callback functions will be called when certain events happen, and that is where you place the .hide() and .how() code: // Untested... $('#MSFree').mouseover(function() { $('#menu2').show(); }); $('#MSFree').mouseout(function() { $('#menu2').hide(); }); -Hector On Wed, Dec 10, 2008 at 10:35 AM, David Blomstrom [EMAIL PROTECTED] wrote: Here's a condensed version of my code... div class=collapsible id=MSFree div id=trigger2 class=triggerspanV/spanMicrosoft-Free/div /div div id='menu2' class='menu'This website was designed/div So I would convert your code to this?: $('#MSFree').show(); $('#MSFree').hide(); Would I just add that to the JQuery code in my head section, and the script would then open whenever someone mouses over it? Thanks. On Wed, Dec 10, 2008 at 10:20 AM, Andy Matthews [EMAIL PROTECTED] wrote: jQuery has built in show() / hide() methods. The syntax would look something like this: $('#someElement').show(); $('#someElement').hide(); Where someElement was a container with an ID. andy _ From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of David Blomstrom Sent: Wednesday, December 10, 2008 12:11 PM To: jquery-en@googlegroups.com Subject: [jQuery] Need Open/Shut Function I've been looking for JQuery examples pages and started browsing through plugins, but I haven't found what I'm looking for yet, so I wondered if anyone here could make some recommendations. If you visit my web page at http://www.geosymbols.org/World/Arizona/, you'll see a Microsoft-Free box in the top right corner of the page. Hovering over it with your mouse causes a small display to appear. At the end of the article is a little Links/Books image with similar behavior (though there's currently no content to display). What JQuery function, plugin or whatever should I use to duplicate those functions? I'd like to be able to style it so that it looks pretty much as it does now
[jQuery] Re: Making a UL simulate an option box?
Dave... First of all, thank you for checking out my code. Second, you just answered a question that I've had since I started using jQuery, namely why does the animation queue up endlessly, or keep going after my mouse moves out. I assume that all you have to do is to add in the .stop() method to accomplish that? andy -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dave Methvin Sent: Monday, December 08, 2008 7:00 PM To: jQuery (English) Subject: [jQuery] Re: Making a UL simulate an option box? I noticed that the page didn't work right with IE and also didn't stop the animation if you did mouseover/out quickly. This version works a bit better: var $cont = $('#scrollMe'); var parentHeight = $cont.height(); var childHeight = $cont.find('li:first').height(); $cont.height(childHeight); $cont.hover(function(){ $cont.stop().animate({ height: parentHeight },'slow'); },function(){ $cont.stop().animate({ height: childHeight },'slow'); });
[jQuery] Making a UL simulate an option box?
Anyone know of a way to collapse a UL containing n number of LI tags into something that appears to be an option box? Andy Matthews
[jQuery] Re: Making a UL simulate an option box?
I've got something that's sort of what I need here: http://www.commadelimited.com/code/scrollingUL/ But it's not perfect. Anyone have anything better? andy matthews _ From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Andy Matthews Sent: Monday, December 08, 2008 2:18 PM To: [jQuery] Subject: [jQuery] Making a UL simulate an option box? Anyone know of a way to collapse a UL containing n number of LI tags into something that appears to be an option box? Andy Matthews
[jQuery] Re: Making a UL simulate an option box?
The primary reason I'm approaching it this way is to be able to use a semantic list of information indexable by search engines, yet have it only take up the height of one element, just like a select box would. The clientele are people looking for automobiles so I'm not all that concerned with blind people, and as it's going to live just above a Google Maps implementation, I'm also not that concerned with people who have low-end technology. The contents might be 1 or 2, to 10 or 15 (all defined by clients). Andy Matthews -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dave Methvin Sent: Monday, December 08, 2008 4:34 PM To: jQuery (English) Subject: [jQuery] Re: Making a UL simulate an option box? Do you need this to be accessible? For example, how will this be used by someone with a screen reader, or with no mouse?
[jQuery] Re: How to access href-property
Matthias... Attr('href') will give you whatever is contained in the href property. If you want the http://otherpage.com; then that needs to be contained in the href property. Using the 'domain' property of the document object will give you the first part: script type=text/javascript !-- alert(document.domain); //-- /script andy -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Matthias Coy Sent: Friday, December 05, 2008 10:10 AM To: jquery-en@googlegroups.com Subject: [jQuery] How to access href-property Hi there, how do I access the href-property of an anchor-element? I know there is a $(#idOfAnAnchor).attr(href); but this only gives me the attribute and not the property. I need the property, because inside of this property is the full URL. See example: a id=idOfAnAnchor1 href=/index.phpHome/a // on otherpage.com a id=idOfAnAnchor2 href=http://somepage.com/index.php;Home/a $(#idOfAnAnchor1).attr(href); // gives '/index.php', needed is 'http://otherpage.com/index.php' $(#idOfAnAnchor2).attr(href); // gives 'http://somepage.com/index.php' I could use: var aLink = document.getElementById(#idOfAnAnchor1); var aHrefProperty = aLink.href; but where is the jQuery fun in this :) ? Regards Matthias
[jQuery] Re: How to access href-property
Here's a reference URL by the way: http://www.hscripts.com/tutorials/javascript/document-object.php On Dec 5, 10:21 am, Andy Matthews [EMAIL PROTECTED] wrote: Matthias... Attr('href') will give you whatever is contained in the href property. If you want the http://otherpage.com; then that needs to be contained in the href property. Using the 'domain' property of the document object will give you the first part: script type=text/javascript !-- alert(document.domain); //-- /script andy -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Matthias Coy Sent: Friday, December 05, 2008 10:10 AM To: jquery-en@googlegroups.com Subject: [jQuery] How to access href-property Hi there, how do I access the href-property of an anchor-element? I know there is a $(#idOfAnAnchor).attr(href); but this only gives me the attribute and not the property. I need the property, because inside of this property is the full URL. See example: a id=idOfAnAnchor1 href=/index.phpHome/a // on otherpage.com a id=idOfAnAnchor2 href=http://somepage.com/index.php;Home/a $(#idOfAnAnchor1).attr(href); // gives '/index.php', needed is 'http://otherpage.com/index.php' $(#idOfAnAnchor2).attr(href); // gives 'http://somepage.com/index.php' I could use: var aLink = document.getElementById(#idOfAnAnchor1); var aHrefProperty = aLink.href; but where is the jQuery fun in this :) ? Regards Matthias
[jQuery] Re: How to access href-property
As an FYI, while I personally prefer relative URLs for simplicity and code reuse, full URLs in the HREF attribute provide slightly better SEO due to the replication of the domain name. On Dec 5, 10:23 am, Andy Matthews [EMAIL PROTECTED] wrote: Here's a reference URL by the way: http://www.hscripts.com/tutorials/javascript/document-object.php On Dec 5, 10:21 am, Andy Matthews [EMAIL PROTECTED] wrote: Matthias... Attr('href') will give you whatever is contained in the href property. If you want the http://otherpage.com; then that needs to be contained in the href property. Using the 'domain' property of the document object will give you the first part: script type=text/javascript !-- alert(document.domain); //-- /script andy -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Matthias Coy Sent: Friday, December 05, 2008 10:10 AM To: jquery-en@googlegroups.com Subject: [jQuery] How to access href-property Hi there, how do I access the href-property of an anchor-element? I know there is a $(#idOfAnAnchor).attr(href); but this only gives me the attribute and not the property. I need the property, because inside of this property is the full URL. See example: a id=idOfAnAnchor1 href=/index.phpHome/a // on otherpage.com a id=idOfAnAnchor2 href=http://somepage.com/index.php;Home/a $(#idOfAnAnchor1).attr(href); // gives '/index.php', needed is 'http://otherpage.com/index.php' $(#idOfAnAnchor2).attr(href); // gives 'http://somepage.com/index.php' I could use: var aLink = document.getElementById(#idOfAnAnchor1); var aHrefProperty = aLink.href; but where is the jQuery fun in this :) ? Regards Matthias
[jQuery] Re: How to access href-property
The crawler fully 'understands' both methods, but bear in mind that in addition to rendering the source code, the crawler also treats the rendered code as text. References to domains can provide a modest increase in performance. While I don't know the exact amount, I'm guessing it's not more than a few percent. This information comes from our in-house SEO department who are all Google, and Yahoo certified in SEO/SEM. andy -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Michael Geary Sent: Friday, December 05, 2008 11:38 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: How to access href-property Is that really true? A crawler has to convert all relative URLs to their full form in order to get to those pages. So it has the exact same full URL on hand whether the HTML has a full or relative URL. I don't have any hard evidence one way or the other, it just seems surprising that a search engine would treat full and relative URLs any differently, given that it has the full URL in all cases anyway. -Mike From: Andy Matthews As an FYI, while I personally prefer relative URLs for simplicity and code reuse, full URLs in the HREF attribute provide slightly better SEO due to the replication of the domain name.
[jQuery] Re: Using window.location.hash for URLs without plugin
location.hash is a property, so you'd just get it's value then compare that. Something like this might work: // get the hash var page = location.hash; // show the correct page $('#' + page).show(); andy matthews _ From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Alex Hempton-Smith Sent: Friday, December 05, 2008 11:48 AM To: jquery-en@googlegroups.com Subject: [jQuery] Using window.location.hash for URLs without plugin Hi, I'm trying to use URL's such as 'mysite.com/#contact' that will show a certain div. I have my function written and working to show the div, currently being used as $(#a.contact).click(showContact); How would I use something like window.location.hash to fire off the function showContact for example, if the URL was /#contact? This would need to provide for about 3 pages, Home, About, Portfolio and Contact. I know there's a plugin for enabling use of the back button etc, but I'd rather something simple without having to load plugins. Many thanks, Alex
[jQuery] Re: multiple width kwicks
I'm pretty sure that the whole point is that the kwicks are evenly distributed. You can't have multiple widths. andy -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of jesusbet Sent: Friday, December 05, 2008 1:17 PM To: jQuery (English) Subject: [jQuery] multiple width kwicks Hi. I'm implementing this effect for a project: http://www.jeremymartin.name/projects.php?project=kwicks The problem is that I'm trying to apply the same effect but using different width buttons, I mean, the first button is 88px width, the second 100px, the third 75px and so on... I tryed defining the widths in the CSS but didn't work, the effect cuts in 700px even if I defined a 960px container, got this CSS: * defaults for all examples */ .kwicks { list-style: none; position: relative; margin: 0; padding: 0; width: 690px; } .kwicks li{ display: block; overflow: hidden; padding: 0; /* cursor: pointer; */ float: left; width: 130px; /* */ height: 50px; margin-right: 0px; } .kwicks li a { display: block; height: 50px; } #it1 { background: url(../img/nav/home.jpg) no-repeat; } #it1.active { background-color: #86e6bb; } #it2 { background: url(../img/nav/about.jpg) no-repeat; } #it2.active { background: url(../img/nav/about_selected.jpg) no-repeat; } #it3 { background: url(../img/nav/procedures.jpg) no-repeat; } #it3.active { background-color: #f5979b; } #it4 { background: url(../img/nav/treatments.jpg) no-repeat; } #it4.active { background-color: #efaffa; } #it5 { background: url(../img/nav/facilities.jpg) no-repeat; } #it5.active { background-color: #86e6bb; } #it6 { background: url(../img/nav/packages.jpg) no-repeat; } #it6.active { background-color: #8d9cdc; } #it7 { background: url(../img/nav/photogallery.jpg) no-repeat; } #it7.active { background-color: #f5979b; } #it8 { background: url(../img/nav/testimonials.jpg) no-repeat; } #it8.active { background-color: #efaffa; } and the js I'm using is in the example 2: http://www.jeremymartin.name/examples/kwicks.php?example=2 As I said, I tried adding the width: 100px; property to each #it (li id=it1/li, li id=it2/li, li id=it3/li and so on) but didn't work. Is there a way to do that effect in different width buttons or I have to change my design and make all buttons the same width? Thank you very much!
[jQuery] Re: Fixed div, content scrolls under it
No, not like that. I'm looking to essentially simulate a frameset, where the navigation stays on top while all content scrolls underneath it. It might be a pure CSS solution and that's fine. I assumed it would require JavaScript of some sort. andy _ From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of aquaone Sent: Tuesday, December 02, 2008 6:23 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Fixed div, content scrolls under it do you mean something other than: div id='nav'.../div div id='content' style='overflow-y:scroll'.../div Sounds like a CSS question, not a jQuery one... stephen On Tue, Dec 2, 2008 at 14:38, Andy Matthews [EMAIL PROTECTED] wrote: I'm looking at the possibility of having navigation at the top of the page, pinned to the top. I'd like for the content to scroll UNDER the container. I've seen it before, but forgot to bookmark it to see how it was done. Does anyone have a plugin for this, or know how it's accomplished and can point me to an example? andy
[jQuery] Re: getting clicked element
Your problem is that you're using the DOM this instead of the jQuery $(this). Read more about that here: http://remysharp.com/2007/04/12/jquerys-this-demystified/ Andy matthews -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of revivedk Sent: Wednesday, December 03, 2008 5:12 AM To: jQuery (English) Cc: [EMAIL PROTECTED] Subject: [jQuery] getting clicked element Hi. how would I register what element is clicked on the site? I need to be able to register what element is clicked, on the entire DOM. $(document).click(function () { var oBj = this; //alert($(oBj).text()); }); this doesn't work, as it returns the entire DOM. and I only need the element that is being clicked on. how would I do this?
[jQuery] Fixed div, content scrolls under it
I'm looking at the possibility of having navigation at the top of the page, pinned to the top. I'd like for the content to scroll UNDER the container. I've seen it before, but forgot to bookmark it to see how it was done. Does anyone have a plugin for this, or know how it's accomplished and can point me to an example? andy
[jQuery] Re: Adding IMG attributes
The best way (IMO) to know if they're working is to view this site in Firefox with the Web Developers Toolbar. Under the View Source button on the toolbar is an option for view generated source. This will show you the results of the page after any JavaScript has been executed. It'll display new attributes, changed attributes, new DOM nodes, etc. andy -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of enchance Sent: Friday, November 28, 2008 7:52 PM To: jQuery (English) Subject: [jQuery] Adding IMG attributes I'm trying to add several attributes to all my img tags but I'm not sure if they're both working. Could you verify if these are correct? $(document).ready(function(){ //add the width and height for each image $('img').each(function(){ $(this).attr('width', $(this).width()); $(this).attr('height', $(this).height()); }); //copy alt to title $('img').attr('title', function(){ $(this).attr('alt'); }); }); Am I doing the right thing?
[jQuery] Re: Double right-click, anyone?
I don't think there's a default double right click event handler, but this wouldn't be that hard to write. Psuedo code --- $('#someElement').rightclick(function(){ totalClicks = 0; if (totalClicks == 2) { // do some stuff totalClicks = 0; } else { totalClicks++; } }); -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of TheBlueSky Sent: Saturday, November 29, 2008 6:21 AM To: jQuery (English) Subject: [jQuery] Double right-click, anyone? Hi everyone, Does anyone has code, implementation, plug-in or whatever to detect double right-click? I'm searching and trying for couple of days now without any result. Appreciate any help.
[jQuery] Re: Image rollover using jQuery
That's a terrible way of doing a swap image. That's adding a load of crap into the actual HTML, most likely creating invalid xHTML and if that's the author's solution then you might as well just use Dreamweaver as it will do that for you. A better solution is to use seasoup's method, or one similar to it: $('img').hover(function() { $(this).attr('src',path + '' + $('this).attr('id') + '_over.gif'; }, function() { $(this).attr('src',path + '' + $('this).attr('id') + '_off.gif'; }); -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of howa Sent: Sunday, November 30, 2008 10:46 PM To: jQuery (English) Subject: [jQuery] Re: Image rollover using jQuery Maybe this: http://code.google.com/p/jquery-swapimage/ On Nov 30, 5:14 pm, Ray M [EMAIL PROTECTED] wrote: Hello, Are there any existing jQuery plugin which can provide similar image rollover functions such as the one provided by Dreamweaver? Thanks. Ray
[jQuery] Re: Ajax to return more values
If you're using a 3rd party JSON library, then you'd just pass in whatever language construct you've got and let the library encode for you. andy -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of me-and-jQuery Sent: Monday, December 01, 2008 11:04 AM To: jQuery (English) Subject: [jQuery] Ajax to return more values Ho-ho-ho. I wonder what is the best practice if I want to get 2 or three values back to function with ajax. The last value would be lots of html code and first two kind of state values (number or short string). I don't like jSON a lot, since you need to return one-line response and you must be careful with a shape ( and }). Second option is having a regex to fetch first two values and all remaining is a third value. And what do you think is the best solution here? Happy December, me-and-jQuery
[jQuery] Re: quote standards
Yes. I am. Plus single quoting is slightly faster due to it's lower case nature. No need to hold down the shift key. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of seasoup Sent: Friday, November 28, 2008 2:47 PM To: jQuery (English) Subject: [jQuery] quote standards I've started using a single quote inside of all $() when quotes are needed because it makes creating DOM elements much simpler. $('a href=/path/a') or $('div id=anId/div and for consistency doing $('#anId'). Anyone else doing the same thing? Josh Powell
[jQuery] Re: Has jQuery development halted?
Have you reviewed the roadmaps for 1.2 and 1.3? http://docs.jquery.com/JQuery_1.2_Roadmap http://docs.jquery.com/JQuery_1.3_Roadmap andy -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Bob den Otter Sent: Wednesday, November 26, 2008 8:54 AM To: jquery-en@googlegroups.com Subject: [jQuery] Has jQuery development halted? Hi all, There hasn't been a jQuery update in what seems like ages, and jQuery UI 1.6 will be released 'in the next few days' since somewhere in september. I know John has been really busy with a lot of great things, but it seems to me like the development of jquery has seriously lagged the last few months. As a small example: there isn't even a way to detect chrome in the official jquery builds yet, and chrome has been out for several months now. I'm afraid that the lack of updates will eventually have a negative impact on the great Query community, causing people to leave for other js frameworks. I sincerely hope not, but i _am_ worried about it. Best, Bob.
[jQuery] Re: How can i do Image rollover with simple gamma change?
Yes... You can use the animate method to fade in/out any element by applying opacity. andy -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of expat101 Sent: Monday, November 24, 2008 3:04 PM To: jQuery (English) Subject: [jQuery] How can i do Image rollover with simple gamma change? I would like to have an image rollover with just basic gamma change to highlight an image...can this be done with basic jquery?
[jQuery] Re: Callback on $.Post not firing
Is it maybe generating an error? Try converting to a .ajax call so that you've got access to the error method handlers. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Rage9 Sent: Monday, November 24, 2008 3:43 PM To: jQuery (English) Subject: [jQuery] Callback on $.Post not firing This is driving me loopy. Simple post, trying to get a result back from the server. Heck even copied it from the documentation and the callback just will not fire, but the post works fine: var answer = confirm(Delete Selected?); if (answer){ $.post(test.php, { name: test }, function(data){ alert(popped off!); alert(data.name); // John console.log(data.time); // 2pm }, json); } PHP: ?php echo json_encode(array(name=John,time=2pm)); ? I also tried with XML with no luck either. Firebug doesn't seem to show a response, but I know the post variables are passed just fine, because I wrote a logger [not included] to tell me what the variables where being passed. No dice on the return info. Tried this with both firefox and opera and in neither the call-backe worked. Ideas?
[jQuery] ANN: Books-a-million.com using jQuery
I used to work for the web company who developed the original BAM site, and now a friend of mine is project manager for them. They just released a new version of their website and it uses jQuery: http://www.booksamillion.com/ From the source, it looks like they're really only making use of an accordion plugin, but hey...another notch in the belt of jQuery.
[jQuery] Re: treeview pluging issues - .find(.hitarea)
Without seeing the rest of the code, the .hitarea is a CSS selector for direct descendants. There's generally something on the left of the angle bracket such as : body .hitarea Which would apply ONLY to those objects with a class of hitarea directly inside the body tag. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of alextait Sent: Thursday, November 20, 2008 9:00 AM To: jQuery (English) Subject: [jQuery] treeview pluging issues - .find(.hitarea) I am fairly new to jquery and I am trying to create a product/category browser/tree using the treeview plugin and ajax. My first simple issue is this peice of code i am trying to understand. .find(.hitarea) what is happening here ? I understand the find functino but not sure about the chevron usage ? the overall problem is this. On viewing my list. if i click on one of the initial categories the second sub categories show up fine. I can then contract this sub list if i wish. If i leave this open and click on one of the sub categories for some reason i cannot then contract it again. I have looked into the treeview plugin code and found that the toggler method which would normaly just contract the list branch fires twice causing it to hide again. If anyone has any idea on thie general problem that would be great. thanks for any help in advance
[jQuery] Re: newbies question
Assuming there's only a handful of characters that might be at the beginning of the test1 string, you could use a regular expression, like so: var test1 = 'a8'; if (test1.match(/^[abcd]8/)) alert('true'); Run those two lines and you should get an alert box saying 'true'. Change the a to a z, and you'll get nothing. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Alfredo Alessandrini Sent: Wednesday, November 19, 2008 9:49 AM To: jquery-en@googlegroups.com Subject: [jQuery] newbies question Hi, Can I simplify this if statement? if (test1 == 'a8' || test1 == 'b8' || test1 == 'c8' || test1 == 'd8' .. I must select some values, the first is a letter and the second is a number (always the number 8: a8, b8, c8, d8, ecc..) Thaks in advance, Alfredo
[jQuery] Re: help with hover function
The hover method is your best bet. It might look like this based on your example: $(li a).hover(function(){ alert('mouse over'); },function(){ alert('mouse out'); }); -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of JamesLov Sent: Wednesday, November 19, 2008 3:09 PM To: jQuery (English) Subject: [jQuery] help with hover function Hi, I have been using jquery for several projects and I am very happy with how easy it is to use. I need some help with (I think) chaining functions, or using callbacks because I'm not sure I quite understand how to tell jquery to go like this: mouseEnter - do this - stop - do this Specifically I have a page that I am building that is setup with thumbnails of images. Please take a look here: http://jameslovinsky.com/couture/index.php When you mouseOver the thumbnail the main image and caption should fadeIn. When you mouseOver the next function I want the visible span to fadeOut, then the new span to fadeIn. Currently its set so that each span will fadeOut when the mouse leaves the thumbnail. This is how the HTML is setup (pseudocode): li a background-image: url(thumbnail) spanimgcaption/span /a /li Its setup this way so it will degrade gracefully as IE6 doesn't allow :hover on anything other than a elements. Anyway, the jquery I tried to make this work the way I described above is (I tried mouseOver and hover functions as well): $(li a) .bind(mouseenter, function(){ $(span).fadeOut(1000); $(this).find(span).css(visibility, visible).fadeIn (1000); $(.center).children(img).hide (); } ); But then when you mouseOver the thumbnail the image will fade in and out in a loop until you move the mouse off. Can anyone suggest a way to either select and fade out any span that is not a descendant of $(this) li a for the first part of the function, or a way to chain the functions so that the effect is select any visible spans - fade them out - stop - select descendant span of $(this) - fade it in Thank you in advance for any help you can give me. James Lovinsky
[jQuery] Re: getJSON and twitter
I've noticed this too. It'll work great for a few page reloads, and then pow, error. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ralph Whitbeck Sent: Monday, November 17, 2008 11:57 PM To: jQuery (English) Subject: [jQuery] getJSON and twitter I wrote a blog post awhile ago on how to pull in Twitters API via JSON and consume it with jQuery. http://damnralph.com/2007/11/20/PullingTwitterUpdatesWithJSONAndJQuery.aspx As you can see in the comments some people are having problems with the code I posted. The problem seems to be when you reload the page. jQuery seems to add a second callback method thus making the JSON data from twitter invalid and breaking the javascript on the page. Here is a page that only has the example code: http://www.damnralph.com/content/binary/twitter-json-jquery.html Can someone look at this and tell me 1. am I doing something wrong? 2. Is this a bug with getJSON and should I post a bug report? 3. Is this just a bug with the Twitter API and should I post a bug report? Thanks
[jQuery] Effect like Kwicks plugin
I'm looking to achieve an effect similar to that of the Kwicks plugin http://www.jeremymartin.name/projects.php?project=kwicks . However, I don't want to use this for navigation, I want to use it for the main body of my site. Currently it looks like the Kwicks plugin can only work on list items, but I'd like something which can be applied to div tags. One http://www.jeremymartin.name/examples/kwicks.php?example=7 of the examples shows the use of divs inside the list item tags, but I don't think that's valid xHTML so I'd rather not use that method. Does anyone know if there's a similar plugin that can be applied to div tags, or does anyone have plain code they might share which can do this? I've already got something that works but doesn't look all that good: http://commadelimited.com/code/maternitymealplanner/ The problems I'm having with my version are: 1) Far right div gets pushed to bottom as animation plays out 2) Animation is a little jerky as the various elements position themselves 3) Occasionally, the cursor will position itself just right and the animation will queue up and then go on for like an extra 5 seconds after the mouse is moved off of it. Thanks peeps Andy Matthews
[jQuery] Re: Effect like Kwicks plugin
Here's a version I've got using the kwicks plugin and divs nested inside the LI tags: http://commadelimited.com/code/maternitymealplanner/kwicks-1.html It's working quite well, but I'm still not convinced that nesting divs inside list items is a good idea. andy -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Andy Matthews Sent: Monday, November 17, 2008 8:53 AM To: jquery-en@googlegroups.com Subject: [jQuery] Effect like Kwicks plugin I'm looking to achieve an effect similar to that of the Kwicks plugin http://www.jeremymartin.name/projects.php?project=kwicks . However, I don't want to use this for navigation, I want to use it for the main body of my site. Currently it looks like the Kwicks plugin can only work on list items, but I'd like something which can be applied to div tags. One of the examples http://www.jeremymartin.name/examples/kwicks.php?example=7 shows the use of divs inside the list item tags, but I don't think that's valid xHTML so I'd rather not use that method. Does anyone know if there's a similar plugin that can be applied to div tags, or does anyone have plain code they might share which can do this? I've already got something that works but doesn't look all that good: http://commadelimited.com/code/maternitymealplanner/ The problems I'm having with my version are: 1) Far right div gets pushed to bottom as animation plays out 2) Animation is a little jerky as the various elements position themselves 3) Occasionally, the cursor will position itself just right and the animation will queue up and then go on for like an extra 5 seconds after the mouse is moved off of it. Thanks peeps Andy Matthews
[jQuery] Re: Effect like Kwicks plugin
Anyone have any input on this? I'd also like to determine if I can use percentages for the widths of the items. On Nov 17, 9:28 am, Andy Matthews [EMAIL PROTECTED] wrote: Here's a version I've got using the kwicks plugin and divs nested inside the LI tags: http://commadelimited.com/code/maternitymealplanner/kwicks-1.html It's working quite well, but I'm still not convinced that nesting divs inside list items is a good idea. andy -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Andy Matthews Sent: Monday, November 17, 2008 8:53 AM To: jquery-en@googlegroups.com Subject: [jQuery] Effect like Kwicks plugin I'm looking to achieve an effect similar to that of the Kwicks plugin http://www.jeremymartin.name/projects.php?project=kwicks . However, I don't want to use this for navigation, I want to use it for the main body of my site. Currently it looks like the Kwicks plugin can only work on list items, but I'd like something which can be applied to div tags. One of the examples http://www.jeremymartin.name/examples/kwicks.php?example=7 shows the use of divs inside the list item tags, but I don't think that's valid xHTML so I'd rather not use that method. Does anyone know if there's a similar plugin that can be applied to div tags, or does anyone have plain code they might share which can do this? I've already got something that works but doesn't look all that good: http://commadelimited.com/code/maternitymealplanner/ The problems I'm having with my version are: 1) Far right div gets pushed to bottom as animation plays out 2) Animation is a little jerky as the various elements position themselves 3) Occasionally, the cursor will position itself just right and the animation will queue up and then go on for like an extra 5 seconds after the mouse is moved off of it. Thanks peeps Andy Matthews
[jQuery] Re: Effect like Kwicks plugin
Hrm... I looked at the src, but didn't see that. I'll check it out and see what happens. Thanks for pointing that our Karl. andy -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Karl Swedberg Sent: Monday, November 17, 2008 2:33 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Effect like Kwicks plugin Hi Andy, I don't see any reason why you couldn't use the Kwiks for jQuery plugin with something other than list items. Just remove the 'li' from the .children() method in line 28: var kwicks = container.children('li'); becomes var kwicks = container.children(); Untested. --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Nov 17, 2008, at 3:04 PM, Andy Matthews wrote: Anyone have any input on this? I'd also like to determine if I can use percentages for the widths of the items. On Nov 17, 9:28 am, Andy Matthews [EMAIL PROTECTED] wrote: Here's a version I've got using the kwicks plugin and divs nested inside the LI tags: http://commadelimited.com/code/maternitymealplanner/kwicks-1.html It's working quite well, but I'm still not convinced that nesting divs inside list items is a good idea. andy -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Andy Matthews Sent: Monday, November 17, 2008 8:53 AM To: jquery-en@googlegroups.com Subject: [jQuery] Effect like Kwicks plugin I'm looking to achieve an effect similar to that of the Kwicks plugin http://www.jeremymartin.name/projects.php?project=kwicks . However, I don't want to use this for navigation, I want to use it for the main body of my site. Currently it looks like the Kwicks plugin can only work on list items, but I'd like something which can be applied to div tags. One of the examples http://www.jeremymartin.name/examples/kwicks.php?example=7 shows the use of divs inside the list item tags, but I don't think that's valid xHTML so I'd rather not use that method. Does anyone know if there's a similar plugin that can be applied to div tags, or does anyone have plain code they might share which can do this? I've already got something that works but doesn't look all that good: http://commadelimited.com/code/maternitymealplanner/ The problems I'm having with my version are: 1) Far right div gets pushed to bottom as animation plays out 2) Animation is a little jerky as the various elements position themselves 3) Occasionally, the cursor will position itself just right and the animation will queue up and then go on for like an extra 5 seconds after the mouse is moved off of it. Thanks peeps Andy Matthews
[jQuery] Re: [ANNOUNCEMENT] jquery.timepickr.js: first official release
I think it looks great. Only suggestion I have is to get the selection portion of the plugin hidden until needed. Say, slide it down when the time field is hovered over? It just takes up too much room right now. andy -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jeffrey Kretz Sent: Tuesday, November 11, 2008 9:35 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: [ANNOUNCEMENT] jquery.timepickr.js: first official release I think it's a great idea --it's a zillion times friendlier than an alert validator in ensuring properly formatted data. JK -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Liam Potter Sent: Tuesday, November 11, 2008 7:16 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: [ANNOUNCEMENT] jquery.timepickr.js: first official release Nice plugin but, how often do you need to input the time into a form? and then, is it really that hard to input the time into a form? Alexandre Plennevaux wrote: impressive, congratz ! On Tue, Nov 11, 2008 at 3:34 PM, h3 [EMAIL PROTECTED] wrote: Hi everyone, Yesterday I released the first public release of my jquery.timepickr plugin. I've posted it on the jQuery plugin page: http://plugins.jquery.com/project/jquery-timepickr Home page: http://haineault.com/media/jquery/ui-timepickr/page/
[jQuery] Re: has anyone come across a plugin like this ?
I'd be interested in this as a plugin as well. On Nov 11, 4:21 pm, heysatan [EMAIL PROTECTED] wrote: That's a start. On Nov 10, 4:13 pm, Microbe [EMAIL PROTECTED] wrote: Demand # 1 :o) On Nov 11, 8:57 am, heysatan [EMAIL PROTECTED] wrote: Hi Sean, I built this breadcrumb animation. Due to time limitations at the end of the project I wasn't able to make it into a plugin (I built a lot of other plugins for this project), but I'd like to when I get a chance. I really solved a problem for us because our category and page titles are so long (scientists are long winded). Before we would show only a couple of steps in the HTML to get around this. This method was more SEO friendly, more usable, and I thought, kind of cool. If there is a demand for it I'll work on porting it to a plugin, but probably not for the next 2 weeks or so. Jason Lead UI Developer - CompareNetworks On Nov 10, 1:21 am, CliffordSean [EMAIL PROTECTED] wrote: see the breadcrumb on here :http://www.biocompare.com/ProductDetails/386912/1/Mutation-Generation... has anyone come across a plugin like this ? tnx sean -- View this message in context:http://www.nabble.com/has-anyone-come-across-a-plugin-like-this---tp2... Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: span tag is width:80px but is only showing the width of contents?
Span is an inline element and cannot have a width applied to it, unless you display it as a block, which would sort of defeat the purpose of having it inline. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of nmiddleweek Sent: Friday, November 07, 2008 9:46 AM To: jQuery (English) Subject: [jQuery] span tag is width:80px but is only showing the width of contents? Hello, I've got a SPAN tag which is set to 80px... span style=width:80px; background-color:#00FF00;A/span The contents of the SPAN is a single character and when rendered on screen, the green SPAN is showing as only approx 15 pixels in width. How can I force the width to be 80px? Thanks, Nick
[jQuery] Re: span tag is width:80px but is only showing the width of contents?
That's a LOT of markup. You could actually use an input field if you just want to set a background color an some text. It might look like this: input type=text name=name style=width: 100px; / input type=text name=name value=some text style=width: 80px;background: #ff; border: 0px;height: 20px; / -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Hector Virgen Sent: Friday, November 07, 2008 10:30 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: span tag is width:80px but is only showing the width of contents? Wrap the input in a div with and set the div's position to relative. Then, add the span as as a div, set the width, and position it absolutely. Its absolute position will be relative to the container div, not the page. div style=position: relative; input type=text name=name style=width: 100px; / div style=position: absolute; left: 100px; top: 0px; width: 90px;test/div /div -Hector On Fri, Nov 7, 2008 at 8:04 AM, nmiddleweek [EMAIL PROTECTED] wrote: Yes that works... What I'm trying to do is display a SPAN atg at the end of an Input text field of a fixed size. If I set the display to block, it is forcing itself to be on the next line. Have you got any idea on how I can do this? Cheers, Nick On Nov 7, 3:48 pm, mbraybrook [EMAIL PROTECTED] wrote: try: span style=width:80px; background-color:#00FF00; display:block;A/ span Does that work? M On Nov 7, 3:45 pm, nmiddleweek [EMAIL PROTECTED] wrote: Hello, I've got a SPAN tag which is set to 80px... span style=width:80px; background-color:#00FF00;A/span The contents of the SPAN is a single character and when rendered on screen, the green SPAN is showing as only approx 15 pixels in width. How can I force the width to be 80px? Thanks, Nick
[jQuery] Re: span tag is width:80px but is only showing the width of contents?
Actually that will NOT fix it all. That makes the span into a block level element which will force it to the next line. andy -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Liam Potter Sent: Friday, November 07, 2008 11:08 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: span tag is width:80px but is only showing the width of contents? the most simple way to do this, is to simply apply display:block on the span. span style=display:block;width:80px;background:#00FF00;A/a that will fix it all. Andy Matthews wrote: That's a LOT of markup. You could actually use an input field if you just want to set a background color an some text. It might look like this: input type=text name=name style=width: 100px; / input type=text name=name value=some text style=width: 80px;background: #ff; border: 0px;height: 20px; / -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Hector Virgen Sent: Friday, November 07, 2008 10:30 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: span tag is width:80px but is only showing the width of contents? Wrap the input in a div with and set the div's position to relative. Then, add the span as as a div, set the width, and position it absolutely. Its absolute position will be relative to the container div, not the page. div style=position: relative; input type=text name=name style=width: 100px; / div style=position: absolute; left: 100px; top: 0px; width: 90px;test/div /div -Hector On Fri, Nov 7, 2008 at 8:04 AM, nmiddleweek [EMAIL PROTECTED] wrote: Yes that works... What I'm trying to do is display a SPAN atg at the end of an Input text field of a fixed size. If I set the display to block, it is forcing itself to be on the next line. Have you got any idea on how I can do this? Cheers, Nick On Nov 7, 3:48 pm, mbraybrook [EMAIL PROTECTED] wrote: try: span style=width:80px; background-color:#00FF00; display:block;A/ span Does that work? M On Nov 7, 3:45 pm, nmiddleweek [EMAIL PROTECTED] wrote: Hello, I've got a SPAN tag which is set to 80px... span style=width:80px; background-color:#00FF00;A/span The contents of the SPAN is a single character and when rendered on screen, the green SPAN is showing as only approx 15 pixels in width. How can I force the width to be 80px? Thanks, Nick
[jQuery] Re: animated robot cartoon with jquery
Anthony... Is the robot supposed to do anything other than drive across the screen? I'm looking for buttons which might cause him to do things, but not seeing them. Is this part of what you're working on, and it's just not in place? This is really well done by the way. I might show this to my daughter once it's done. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of anthony.calzadilla Sent: Friday, November 07, 2008 11:58 AM To: jQuery (English) Subject: [jQuery] Re: animated robot cartoon with jquery Hi, I changed the 'bounceHim' function a bit so that the different pieces of the robot look like they are separated and bouncing individually: function bounceHim(){ $(#sec-content,#branding).animate({top:-=5px}, 150).animate({top:+=5px},150); $(#content).animate({top:-=8px},150).animate({top:+=8px},150); setTimeout(bounceHim(),300); } http://robot.anthonycalzadilla.com/ Once again thanks for your insight. I really am a complete novice at programming in general. I'm really scrutinizing your code so as to learn from it. -Anthony On Nov 7, 8:34 am, CodingCyborg [EMAIL PROTECTED] wrote: I just noticed, after looking over the code again, that since you have all three pieces of the robot that are bouncing bounce at the same time the line of code can be condensed into one. As well as the two that bounce together at the beginning. This: $(#content).animate({top:-=+num+px},150).animate({top:+=+num +px},150); $(#branding).animate({top:-=+num+px},150).animate({top:+=+num +px},150); Becomes this: $(#content,#branding).animate({top:-=+num+px}, 150).animate({top:+=+num+px},150); And in the next function this: $(#sec-content).animate({top:-=5px},150).animate({top:+=5px}, 150); $(#content).animate({top:-=5px},150).animate({top:+=5px},150); $(#branding).animate({top:-=5px},150).animate({top:+=5px},150); Becomes this: $(#sec-content,#content,#branding).animate({top:-=5px}, 150).animate({top:+=5px},150); Of course, if you wished to have each part bounce a different amount or at different rates you would need to set up different timeouts with different functions if they couldn't be set with the current 300 ms function. But if you wanted something to go at half speed or a whole number multiple speed you could just changed how much code was in the function and the numbers associated with it. (If any of that makes sense.) But that saves more code, and again, makes the file a bit (Quite seriously only a few bits :P) smaller. On Nov 7, 12:44 am, anthony.calzadilla [EMAIL PROTECTED] wrote: Wow! Thank you CodingCyborg! Thank You! I'm going to study and learn from your code example and implement it into mine. -Anthony On Nov 7, 12:24 am, CodingCyborg [EMAIL PROTECTED] wrote: I made a few more modifications such that the robot doesn't keep bouncing and the sky keep moving when the ground has stopped. Though I did the cheap way, in the sense that I just made it a short clip rather than a full length repeat. http://codingcyborg.com/jQueryFun/Robot/robot.html That has the same basic directory set up, but with the modified script.js file for viewing. On Nov 6, 11:07 pm, CodingCyborg [EMAIL PROTECTED] wrote: This is Beautiful! To save yourself from the copy/paste to create the repeated bounce, and to make the file smaller, you can simply replace the three lines that were enormously long with this: startHim(); And then add this at the bottom of the js file: var num = 1; function startHim(){ num++; $(#sec-content).animate({top:-=5px},150).animate({top:+=5px }, 150); $(#content).animate({top:-=+num+px},150).animate({top:+= +num +px},150); $(#branding).animate({top:-=+num+px},150).animate({top:+= +num +px},150); if(num4){ setTimeout(startHim(),300); } else { setTimeout(bounceHim(),300); } } function bounceHim(){ $(#sec-content).animate({top:-=5px},150).animate({top:+=5px }, 150); $(#content).animate({top:-=5px},150).animate({top:+=5px},1 50); $(#branding).animate({top:-=5px},150).animate({top:+=5px}, 150); setTimeout(bounceHim(),300); } This allows for more control of the looped animation and easier to edit the bounciness of the robot. That's all I could enhance, if you could call it that. It's an amazing display of js and jQuery skills, and I admire you for that. On Nov 5, 10:56 pm, anthony.calzadilla [EMAIL PROTECTED] wrote: Hi all, I occasionally volunteer as a guest speaker for the web design class at my child's elementary school. I wanted to introduce them to
[jQuery] Re: animated robot cartoon with jquery
He's only saying that so he can get out of responsibility. :) -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike Alsup Sent: Friday, November 07, 2008 12:04 PM To: jQuery (English) Subject: [jQuery] Re: animated robot cartoon with jquery Unfortunately, I'm new to jQuery and Javascript, too, so I'm of no use to you on the code. Say what? Rick, you've been contributing to the mailing list for over two years. I think the honeymoon phase is over for you! :-)
[jQuery] Re: get form id from button click
After you've clicked the submit button for a form: Var myID = $(this).attr('id'); -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of lance123 Sent: Friday, November 07, 2008 3:09 PM To: jQuery (English) Subject: [jQuery] get form id from button click Hi To All, How do I get the form id from a button click. I have multiple forms with dynamic id's and want to get the id to pass it back to an ajax form function ie $(#+form_id) any help much appreciated. Thanks, Lance
[jQuery] Re: on click doesn't work!
It might help if you moved the jQuery code out of the HTML. It would help you focus on each seperately which could assist you in finding the problem. Plus, if you're just going to use jQuery inline, then why bother with using it at all? andy -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Miri Sent: Wednesday, November 05, 2008 10:53 AM To: jQuery (English) Subject: [jQuery] on click doesn't work! Hi everyone! I've been trying to find the problem in the code below, but I have no idea what it is. The problem is with the on click option - it just doesn't work.. Can anyone please help me?!?! Thanks very much in advance.. Miri. The code: # div id=myform # h3Do you want to subscribe to our newsletter?/h3 # # form # input onclick=javascript: $('#email').show('slow'); type=radio name=subscribe value=1 / # labelYes, I want to subscribe/label # br / # # input onclick=javascript: $('#email').hide('slow'); type=radio name=subscribe value=0 / # labelNo, thanks/label # br / # # div id=email # labelEmail Address: /label # input name=email type=text / # /div # /form # /div
[jQuery] Re: Check if remote file exists.
I think if you use the $.ajax method, you can implement the built in failure method and go from there. andy -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Genu Sent: Wednesday, November 05, 2008 12:54 PM To: jQuery (English) Subject: [jQuery] Check if remote file exists. Is it possible to use jquery to check of remote file (url) exists or not. For example, I have this url: http://www.myserver.com/media/test.mp3 can I use a jquery http request to see if the url is valid or not?
[jQuery] Re: Effect Like slideUp/Down
There's also show/hide. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Panman Sent: Wednesday, November 05, 2008 3:09 PM To: jQuery (English) Subject: [jQuery] Effect Like slideUp/Down I cannot for the life of me figure this out. I know it must be easy, just not finding the solution. I'd like to toggle() something and use the slide effect. However, I don't like how the UI slide effect works. It slides the content out of view then brings whatever was below up. I'd rather have whatever is below slide up with the content. Compare how .hide(slide, {direction: up}, slow) and .slideUp(slow) differ. I tried using the core toggle() with slideUp/Down but that is not reliable. Thanks for any input!
[jQuery] Re: Gradientz
Man...how's that for service! Great job weepy! -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of weepy Sent: Tuesday, November 04, 2008 8:41 AM To: jQuery (English) Subject: [jQuery] Re: Gradientz Ok this is fixed - I've just pushed a new version. Check again - it should be fixed. http://www.parkerfox.co.uk/labs/gradientz/ On 4 Nov, 14:37, Rick Faircloth [EMAIL PROTECTED] wrote: Thanks, weepy... When you said it creates graduated backgrounds I assumed it would respond like a true background image. Perhaps that's not what you intended. Rick weepy wrote: Ah Rick - I'll take a look. On 4 Nov, 14:14, Rick Faircloth [EMAIL PROTECTED] wrote: Hey, I like gradientz very much! Question... how do I make the gradient to be the background for a div? I created a div with a gradient and put the text inside the div, but the text appears outside the gradient, not over it... script type=text/javascript $(document).ready(function() { $('#box1').gradientz({ start: gray, end: white, angle: 0 }) }); /script div id=box1 style=height:200px; width:200px; padding:10px; color:white; This is the text in my gradient box!/div Rick weepy wrote: Just released a jQuery plugin Gradientz which creates graduated backgrounds without the need for images. * Uses VML in IE and canvas in Firefox, Webkit. * Cross Browser: Tested on FF3, IE6, IE7, Safari * Fast * No need for excanvas * Small: 2.2k uncompressed For those of you that have seen Cornerz - it works in a very similar way. See more herehttp://www.parkerfox.co.uk/labs/gradientz/ Enjoy! weepy ;..( -- -- No virus found in this incoming message. Checked by AVG -http://www.avg.com Version: 8.0.175 / Virus Database: 270.8.6/1765 - Release Date: 11/3/2008 4:59 PM -- -- No virus found in this incoming message. Checked by AVG -http://www.avg.com Version: 8.0.175 / Virus Database: 270.8.6/1765 - Release Date: 11/3/2008 4:59 PM
[jQuery] Re: Large text files via AJAX
Honestly it sounds like this isn't a good use of AJAX. Wasn't reallty intended for use with 1mb+ files. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Monday, November 03, 2008 5:54 PM To: jquery-en@googlegroups.com Subject: [jQuery] Large text files via AJAX Greets all. I have an application which passes large amounts of plain text to update a pre id=textdata/pre block on the client. This is all plain text and can range in size from a few bytes to 64MB. Typically though the text files are less than 1MB. Updating the pre block can be slow. I'm sending the request via POST and getting the data back in a json object along with some metadata about the text file. I'm starting to look at this and I'm thinking that I would see better performance by breaking out the request into two parts: 0) Make sure the data is gziped 1) Request the text file via POST and get json response of metadata only 2) Update the web page from the json response 3) Second request to update the pre block directly from text data GET request Thoughts? What is the fastest way to update a text block with large amount of plain text? Paging isn't an option here :) Thanks. -- Scott
[jQuery] Re: Getting width of broken image updated: working now
Josh... Since you may be curious what I was working on, it's just a little comic strip viewer for a webcomic called Goats: http://www.commadelimited.com/code/goats.cfm It's archives go back roughly 10 years, and I'm trying to work through all the backlog. Since it's published daily, the archives are approaching 3000 strips. Anywya, I wanted a way to quickly read through back strips, and so I wrote this little viewer. andy -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Josh Nathanson Sent: Wednesday, October 29, 2008 2:44 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Getting width of broken image? Another thing you can try is attach the handler directly to the load event for each image: $(img).load(function() { alert('image ' + this.src + ' is loaded and has width ' + $(this).width()); }); This should work ok within document.ready, as the img tags will be loaded in the DOM and have the event handler bound before the images themselves are loaded. -- Josh - Original Message - From: Andy Matthews [EMAIL PROTECTED] To: jQuery (English) jquery-en@googlegroups.com Sent: Wednesday, October 29, 2008 11:37 AM Subject: [jQuery] Re: Getting width of broken image? Hrm... That worked, but it's taking longer than I'd like, and it's not really consistent. I'll just go another route. Thanks for the input guys. On Oct 29, 11:44 am, Josh Nathanson [EMAIL PROTECTED] wrote: Andy - window.onload is called only after all images are loaded, so you can do this: $(window).load(function() { $(img).each(function() { alert( this.offsetWidth500 ); }); }); -- Josh - Original Message - From: Andy Matthews [EMAIL PROTECTED] To: jQuery (English) jquery-en@googlegroups.com Sent: Wednesday, October 29, 2008 9:24 AM Subject: [jQuery] Re: Getting width of broken image? Okay... I figured out why it's not working. My code is firing before the images are fully loaded, therefore the width of the image is zero until the browser downloads the image. I installed a click event on each image which reported the actual width correctly. So, how might I only run this code AFTER the images have loaded? $('img').each(function(){ alert(this.offsetWidth500); }); Alternately, is there a way to test to see if the image is broken using jQuery? On Oct 29, 10:54 am, ricardobeat [EMAIL PROTECTED] wrote: Besides the bracket weidc mentioned, is your document valid? I get the correct image width by using width() on both IE and FF. Alternatively you can check for the offsetWidth attribute. $('img').each(function(){ alert(this.offsetWidth500); }); On Oct 29, 11:30 am, Andy Matthews [EMAIL PROTECTED] wrote: I'm loading in a batch of images dynamically. Some of the images might not exist and I'm wondering how I might test for that image using jQuery (1.2.6). All I really want to do is to remove that img from the DOM so that it doesn't show on the page. I thought at first it would be simple enough to test the width of the image. All the valid images should be around 600 pixels wide, whereas the broken image should be 30 or so. I tried this: ${'img').each(function(){ alert( $(this).width() ); }); But I got 0 for both a valid, and invalid, image. Anyone have any ideas? andy
[jQuery] Getting width of broken image?
I'm loading in a batch of images dynamically. Some of the images might not exist and I'm wondering how I might test for that image using jQuery (1.2.6). All I really want to do is to remove that img from the DOM so that it doesn't show on the page. I thought at first it would be simple enough to test the width of the image. All the valid images should be around 600 pixels wide, whereas the broken image should be 30 or so. I tried this: ${'img').each(function(){ alert( $(this).width() ); }); But I got 0 for both a valid, and invalid, image. Anyone have any ideas? andy
[jQuery] Re: Getting width of broken image?
I meant to write img. All that's on the page are images. For every img on the page I was trying to alert it's width so that I could test it. To no avail though. It kept outputting as 0. Regarding the 404 suggestion, these are images not under my domain. I'm pulling in an image from a 3rd party website. andy -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of weidc Sent: Wednesday, October 29, 2008 9:15 AM To: jQuery (English) Subject: [jQuery] Re: Getting width of broken image? hi, eh.. did you copy your code? 'Cause you wrote {'img'). On 29 Okt., 14:30, Andy Matthews [EMAIL PROTECTED] wrote: I'm loading in a batch of images dynamically. Some of the images might not exist and I'm wondering how I might test for that image using jQuery (1.2.6). All I really want to do is to remove that img from the DOM so that it doesn't show on the page. I thought at first it would be simple enough to test the width of the image. All the valid images should be around 600 pixels wide, whereas the broken image should be 30 or so. I tried this: ${'img').each(function(){ alert( $(this).width() ); }); But I got 0 for both a valid, and invalid, image. Anyone have any ideas? andy
[jQuery] Re: Getting width of broken image?
Okay... I figured out why it's not working. My code is firing before the images are fully loaded, therefore the width of the image is zero until the browser downloads the image. I installed a click event on each image which reported the actual width correctly. So, how might I only run this code AFTER the images have loaded? $('img').each(function(){ alert(this.offsetWidth500); }); Alternately, is there a way to test to see if the image is broken using jQuery? On Oct 29, 10:54 am, ricardobeat [EMAIL PROTECTED] wrote: Besides the bracket weidc mentioned, is your document valid? I get the correct image width by using width() on both IE and FF. Alternatively you can check for the offsetWidth attribute. $('img').each(function(){ alert(this.offsetWidth500); }); On Oct 29, 11:30 am, Andy Matthews [EMAIL PROTECTED] wrote: I'm loading in a batch of images dynamically. Some of the images might not exist and I'm wondering how I might test for that image using jQuery (1.2.6). All I really want to do is to remove that img from the DOM so that it doesn't show on the page. I thought at first it would be simple enough to test the width of the image. All the valid images should be around 600 pixels wide, whereas the broken image should be 30 or so. I tried this: ${'img').each(function(){ alert( $(this).width() ); }); But I got 0 for both a valid, and invalid, image. Anyone have any ideas? andy
[jQuery] Re: Getting width of broken image?
Hrm... That worked, but it's taking longer than I'd like, and it's not really consistent. I'll just go another route. Thanks for the input guys. On Oct 29, 11:44 am, Josh Nathanson [EMAIL PROTECTED] wrote: Andy - window.onload is called only after all images are loaded, so you can do this: $(window).load(function() { $(img).each(function() { alert( this.offsetWidth500 ); }); }); -- Josh - Original Message - From: Andy Matthews [EMAIL PROTECTED] To: jQuery (English) jquery-en@googlegroups.com Sent: Wednesday, October 29, 2008 9:24 AM Subject: [jQuery] Re: Getting width of broken image? Okay... I figured out why it's not working. My code is firing before the images are fully loaded, therefore the width of the image is zero until the browser downloads the image. I installed a click event on each image which reported the actual width correctly. So, how might I only run this code AFTER the images have loaded? $('img').each(function(){ alert(this.offsetWidth500); }); Alternately, is there a way to test to see if the image is broken using jQuery? On Oct 29, 10:54 am, ricardobeat [EMAIL PROTECTED] wrote: Besides the bracket weidc mentioned, is your document valid? I get the correct image width by using width() on both IE and FF. Alternatively you can check for the offsetWidth attribute. $('img').each(function(){ alert(this.offsetWidth500); }); On Oct 29, 11:30 am, Andy Matthews [EMAIL PROTECTED] wrote: I'm loading in a batch of images dynamically. Some of the images might not exist and I'm wondering how I might test for that image using jQuery (1.2.6). All I really want to do is to remove that img from the DOM so that it doesn't show on the page. I thought at first it would be simple enough to test the width of the image. All the valid images should be around 600 pixels wide, whereas the broken image should be 30 or so. I tried this: ${'img').each(function(){ alert( $(this).width() ); }); But I got 0 for both a valid, and invalid, image. Anyone have any ideas? andy
[jQuery] Re: Getting width of broken image?
That might get me where I want to go. Thanks Josh! -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Josh Nathanson Sent: Wednesday, October 29, 2008 2:44 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Getting width of broken image? Another thing you can try is attach the handler directly to the load event for each image: $(img).load(function() { alert('image ' + this.src + ' is loaded and has width ' + $(this).width()); }); This should work ok within document.ready, as the img tags will be loaded in the DOM and have the event handler bound before the images themselves are loaded. -- Josh - Original Message - From: Andy Matthews [EMAIL PROTECTED] To: jQuery (English) jquery-en@googlegroups.com Sent: Wednesday, October 29, 2008 11:37 AM Subject: [jQuery] Re: Getting width of broken image? Hrm... That worked, but it's taking longer than I'd like, and it's not really consistent. I'll just go another route. Thanks for the input guys. On Oct 29, 11:44 am, Josh Nathanson [EMAIL PROTECTED] wrote: Andy - window.onload is called only after all images are loaded, so you can do this: $(window).load(function() { $(img).each(function() { alert( this.offsetWidth500 ); }); }); -- Josh - Original Message - From: Andy Matthews [EMAIL PROTECTED] To: jQuery (English) jquery-en@googlegroups.com Sent: Wednesday, October 29, 2008 9:24 AM Subject: [jQuery] Re: Getting width of broken image? Okay... I figured out why it's not working. My code is firing before the images are fully loaded, therefore the width of the image is zero until the browser downloads the image. I installed a click event on each image which reported the actual width correctly. So, how might I only run this code AFTER the images have loaded? $('img').each(function(){ alert(this.offsetWidth500); }); Alternately, is there a way to test to see if the image is broken using jQuery? On Oct 29, 10:54 am, ricardobeat [EMAIL PROTECTED] wrote: Besides the bracket weidc mentioned, is your document valid? I get the correct image width by using width() on both IE and FF. Alternatively you can check for the offsetWidth attribute. $('img').each(function(){ alert(this.offsetWidth500); }); On Oct 29, 11:30 am, Andy Matthews [EMAIL PROTECTED] wrote: I'm loading in a batch of images dynamically. Some of the images might not exist and I'm wondering how I might test for that image using jQuery (1.2.6). All I really want to do is to remove that img from the DOM so that it doesn't show on the page. I thought at first it would be simple enough to test the width of the image. All the valid images should be around 600 pixels wide, whereas the broken image should be 30 or so. I tried this: ${'img').each(function(){ alert( $(this).width() ); }); But I got 0 for both a valid, and invalid, image. Anyone have any ideas? andy
[jQuery] Re: my first plugin
That's very well done. Good job Diego. I really like the animation when you hover over the thumbnail. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of diego Sent: Tuesday, October 28, 2008 2:04 PM To: jQuery (English) Subject: [jQuery] my first plugin Hi all, i'm going to finish my first plugin, i'm not exactly a programmer.. just a webdesigner with aptitude for programming, especially with jquery :) I would like your opinion about this plugin, and some advices to make it work better. here it's a simple demo page.. http://www.pirolab.it/piro_09/pirobox.html Here again an example associated with a web page complete http://www.pirolab.it/piro_09/index2.html in the end, my code.. http://www.pirolab.it/piro_09/js/pirobox.js TNX to all. Diego Valobra
[jQuery] testing - please ignore
asdsad
[jQuery] Re: pagination solution
The OP said that he was using ASP. Depending on what data you're showing, the tablesorter plugin might work for you. It's got pagination built in if I recall. andy -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Rene Veerman Sent: Monday, October 27, 2008 12:23 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: pagination solution 'plugin' usually refers to a javascript thing. you need php aswell and since db definitions vary wildly, it's hard to create something standarized.. i dont know of any components/plugins that do this and are easy to configure.. i did write something on this topic, which you can find here: http://www.nabble.com/how-to-do-paging--tc19759005s27240.html bdee1 wrote: I am looking for a simple solution to add pagination to some reports i have built using ASP and jquery. the problem is that the reports are returning so much data that the script(s) are timing out. SO based on that - i assume i woudl need to have some kind of ajax based pagination so that the script is only returning a small amount of data from the database at a time. But i will also need to be able to sort the columns and possibly search them. is there any simple plugin or combination of plugins that will allow for this?
[jQuery] Re: Background image position?!
Works fine for me in Chrome. andy -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Paul Cripps Sent: Monday, October 27, 2008 7:45 AM To: jquery-en@googlegroups.com Subject: [jQuery] Background image position?! I have a pop up div on our sites home page. The content changes based on the menu link the user clicked. A triangle tab should then move to reside between the clicked menu item and the popUp. This works fine of the dev server, but not on our live server (http://www.pro-bel.co.uk/) We've checked: The jQuery.js files and tried re-uploading the latest version, both compact and normal. My scripts are the same on both servers. Both sites are on the same server though, just a difference domain?! To see the problem go to the live site: http://www.pro-bel.co.uk and click on Routing Control then Automation and Media Management then Master Control. The blue triangle moves on the dev server to match the position of the clicked link. My Code: $('div#solutions a.popUp').click(function(event) { event.preventDefault(); /* Position tag */ var myPos = $(this).position(); var popup = $('#solutionTool'); // 327 is the Y position of the UL // 24 is the aprox height of the li item var myY = (myPos.top - 327 + 24) + 'px'; $('#solutionTool').css(backgroundPosition, 0px + myY + px); return false; }); -- View this message in context: http://www.nabble.com/Background-image-position-%21-tp20186995s27240p2018699 5.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Autolinking Twitter @usernames with jQuery
A simple regex should take care of that for you. Just search for any occurrence of @any number of letters of numbers and wrap the result in an href tag. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Betty B Sent: Wednesday, October 22, 2008 1:28 PM To: jQuery (English) Subject: [jQuery] Autolinking Twitter @usernames with jQuery Hi, Fairly new to this, I'd like to know if such a thing is possible with jQuery: I have a social bookmarks-like page where users can post a link and description. I'd like to have some kind of function that would automatically link @USERNAME to that persons Twitter page (http:// twitter.com/USERNAME) when, or if, they add their @USERNAME to the description field. (div class=description) Can this be done with jQuery? Could someone point me in the right direction? Thanks, BB
[jQuery] Re: sortable links
There's probably a return false option in the plugin options. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Adam Sent: Monday, October 13, 2008 8:50 AM To: jQuery (English) Subject: [jQuery] sortable links Using the jquery UI plugin, I have setup a list of links (anchors) to be sortable, but after I sort an item, the link is executed, and I am taken to the web page for that link. Is there a way to setup the Sortable plugin to prevent this from happening?
[jQuery] Re: sortable links
He's not talking about clicking on the link to activate it, but clcking on it to drag and sort it. I will say that you might be better off applying the sortable to an LI tag which contains the link, rather than directly to the link itself. Remember that a link isn't technically a list, but a group of li tags are. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of MorningZ Sent: Monday, October 13, 2008 9:04 AM To: jQuery (English) Subject: [jQuery] Re: sortable links if you don't want the user to go anywhere when clicking on a link, then why use a link? On Oct 13, 9:50 am, Adam [EMAIL PROTECTED] wrote: Using the jquery UI plugin, I have setup a list of links (anchors) to be sortable, but after I sort an item, the link is executed, and I am taken to the web page for that link. Is there a way to setup the Sortable plugin to prevent this from happening?
[jQuery] Re: cite jquery
Footer link would probably be nice, or a credits page in the footer, or even in your source code. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of forgetta Sent: Monday, September 29, 2008 10:16 AM To: jQuery (English) Subject: [jQuery] cite jquery Hi all, I am using JQuery in a web application I plan to publish. How do I cite JQuery? Thanks. Vince
[jQuery] Re: i was patient, now i'm frustrated
You're complaining why? Why should the jQuery site not loading affect your job in any way? The jQuery site offers nothing to me that I can't find elsewhere. I can get the most recent jQuery release from Google code, Remy Sharp has the API hosted on his site (or his downloable AIR app), and I have this mailing list. Why do you need the site at all? andy -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Richard W Sent: Friday, September 26, 2008 3:36 AM To: jQuery (English) Subject: [jQuery] i was patient, now i'm frustrated How long does it take to sort out hosting issues? 1 month, 2 months? I've been reading all the comments from frustrated developers who are unable to do their job because the jQuery site does not load. I thought those people should understand the situation and be patient. Now it's my turn to complain, because now this is affecting my job. Media Template obviously don't have the knowledge or capacity to correctly host a high traffic site. What's the problem, really, i'm curious why this SERIOUS issue has not been resolved after so long?
[jQuery] Re: Listen for location anchor change?
Javascript has the built in property location.hash that will return the value of the anchor along with the # sign. andy -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of mario Sent: Wednesday, September 24, 2008 3:09 PM To: jQuery (English) Subject: [jQuery] Listen for location anchor change? Hi, I was just wondering if there is anyway to listen for changes on the location bar when a link sets an anchor on the same page. Example: current location: www.something.com/ I click on a link and it takes me to: www.something.com/#someanchor Is there anyway to listen for this change/event with jquery?
[jQuery] Re: using click() with $(event.target).is(something)
If the click event for button A happens after the page load, then you'll need to rebind the event for button A in button b's success block. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of light-blue Sent: Monday, September 22, 2008 3:24 PM To: jQuery (English) Subject: [jQuery] using click() with $(event.target).is(something) I'm a Jquery newbie, so if this answer is available somewhere, please let me know. My user needs to click button B, which processes some info with AJAX (working great), and then needs to programmatically click button A, which itself runs an AJAX request. Button B works fine, but when it tries $('a.buttonA').click() the code in button A doesn't run. I suspect this is because I'm using $(event.target).is('a.buttonB'), resulting in no binding for click() to run. Can anyone confirm? Any suggestions to fix this? Thanks!
[jQuery] Re: jQuery.center Plugin
Bob... Is there any reason why you're not doing this with pure CSS? You'd probably be done by now if you did. Here's a simple example: http://commadelimited.com/uploads/center.html As you can see, there's hardly anything to the CSS, and it's very simple to implement. andy -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mr Fett Sent: Thursday, September 18, 2008 10:47 AM To: jQuery (English) Subject: [jQuery] jQuery.center Plugin Hi all, I'm trying to debug a plugin - I believe its a new plugin and has a bug as the behavior of it is incredibly inconsistent across browsers. The plugin is the jQuery.center - http://plugins.jquery.com/project/elementcenter. For reference I've put a basic example of my implementation of this: http://www.rdp.freshmango.com/defaultAlexanmtz.asp I also found another version of the plugin here: http://exscale.se/archives/2007/11/20/jquery-center-element-plugin/ For reference I've put a basic example of my implementation of this one here: http://www.rdp.freshmango.com/ Does anyone have any ideas? Basically all I'm trying to do is vertically horizontally center a fixed width/height DIV in the browser window. Thanks! Bob
[jQuery] Re: apples webclip feature in jquery
Could you elaborate? What is this webclip of which you speak? -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tom Shafer Sent: Wednesday, September 17, 2008 11:41 AM To: jQuery (English) Subject: [jQuery] apples webclip feature in jquery I am wanting to write something like apples webclip feature in safari for jquery, I am trying to figure out where the best place to start is. Does anyone have any ideas? Thanks, -TJ
[jQuery] Re: Checking if input is a number.
Well, a number by definition can't have spaces in it. So if there ARE spaces, then it's a string, and can be treated as such. Alternately I suppose you could try multiplying the value by 1 and see what you get. andy -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of africanshox Sent: Tuesday, September 16, 2008 9:39 AM To: jQuery (English) Subject: [jQuery] Checking if input is a number. i have a serach box that checks for a product code or product keyword. I need to find out how i can check if the input submitted on this search box is a number, and if it is, remove any white spaces. The reason is that product codes coming from a feed have a space in them and it is much easier if i sue jquery rather than go through a collection fo nearly 20,000 codes. can anyone point me in the right direction?
[jQuery] Re: Oddity with Jquery and Adobe AIR
Ah... That makes perfect sense then. In that case, I believe that AIR has trouble (or might not be able to) read externally loaded Javascript. It's a sandboxing issue: http://labs.adobe.com/wiki/index.php/AIR:HTML_Security_FAQ#So_what_does_this _new_security_model_look_like.3F -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of gecko68 Sent: Thursday, September 11, 2008 8:16 PM To: jQuery (English) Subject: [jQuery] Re: Oddity with Jquery and Adobe AIR Yes the click event works. But it will require a lot more programming since the HTML being added is generated via Ajax. I guess I could bring the data in via json and assemble the HTML objects from within the original script. I am curious why it works in safari but not webkit/air. Thanks for the assist. On Sep 11, 4:40 pm, Andy Matthews [EMAIL PROTECTED] wrote: Why are you using onclick attributes? jQuery supports the click event natively (which also works in AIR apps: Looks like for your HTML the jQuery might be this: $('span.pageName a').click(function(){ // do something here }); This has the added benefit of cleaning up your HTML and making it far easier to read. andy matthews -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of gecko68 Sent: Thursday, September 11, 2008 1:45 PM To: jQuery (English) Subject: [jQuery] Oddity with Jquery and Adobe AIR I am trying to append some HTML to an object. It includes href's and onclick events, but for some reason in AIR the onclicks don't seem to fire. var pageName = 'text'; var x = 1; var newPageData = div class='panel' id='r+x+'span class='pageName'+pageName+ + a href='javascript:void(0);' onclick='alert(+x+);'img src='images/control-delete-16.png' class='mini-icon'/a/spanp/ + input type='checkbox' id='r+x+newpage' value='true'Check mebr// div; $('.scrollContainer').append(newPageData); It all appears fine, but when I click the icon, nothing happens. I have tested this script in FireFox and Opera with no problems. Any help would be appreciated. Dan
[jQuery] Re: Detecting Ctrl + click
Should just be a matter of checking the keypress event: http://docs.jquery.com/Events/keypress#fn -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Wednesday, September 10, 2008 6:10 PM To: jQuery (English) Subject: [jQuery] Detecting Ctrl + click Hi, How could I detect someone holding down the Ctrl key and then clicking the mouse button on something? Similar question for the Mac -- holding down the Shift key and clicking the mouse button. - Dave
[jQuery] jquery 1.2.3, validation plugin 1.1, and IE6
A coworker is trying to use this combination of codes to get a basic validation working for a form he's building. It works just fine in FF2, but does nothing in IE6, with no errors. Does anyone know of any reason why this shouldn't work? Andy Matthews Senior ColdFusion Developer Office: 615.627.9747 Fax: 615.467.6249 www.dealerskins.com http://www.dealerskins.com/ Total customer satisfaction is my number 1 priority! If you are not completely satisfied with the service I have provided, please let me know right away so I can correct the problem, or notify my manager Aaron West at [EMAIL PROTECTED] LOGO_EMAIL_TM.JPG
[jQuery] Re: jquery 1.2.3, validation plugin 1.1, and IE6
Okay... I'll get him to upload a test page when he gets back. Thanks Jörn. andy -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jörn Zaefferer Sent: Thursday, September 11, 2008 10:15 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: jquery 1.2.3, validation plugin 1.1, and IE6 Either you update to latest version (1.2.6 + 1.4) or you at least provide a testpage - can't help you otherwise. Jörn On Thu, Sep 11, 2008 at 5:04 PM, Andy Matthews [EMAIL PROTECTED] wrote: A coworker is trying to use this combination of codes to get a basic validation working for a form he's building. It works just fine in FF2, but does nothing in IE6, with no errors. Does anyone know of any reason why this shouldn't work? Andy Matthews Senior ColdFusion Developer Office: 615.627.9747 Fax: 615.467.6249 www.dealerskins.com Total customer satisfaction is my number 1 priority! If you are not completely satisfied with the service I have provided, please let me know right away so I can correct the problem, or notify my manager Aaron West at [EMAIL PROTECTED]
[jQuery] Re: Oddity with Jquery and Adobe AIR
Why are you using onclick attributes? jQuery supports the click event natively (which also works in AIR apps: Looks like for your HTML the jQuery might be this: $('span.pageName a').click(function(){ // do something here }); This has the added benefit of cleaning up your HTML and making it far easier to read. andy matthews -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of gecko68 Sent: Thursday, September 11, 2008 1:45 PM To: jQuery (English) Subject: [jQuery] Oddity with Jquery and Adobe AIR I am trying to append some HTML to an object. It includes href's and onclick events, but for some reason in AIR the onclicks don't seem to fire. var pageName = 'text'; var x = 1; var newPageData = div class='panel' id='r+x+'span class='pageName'+pageName+ + a href='javascript:void(0);' onclick='alert(+x+);'img src='images/control-delete-16.png' class='mini-icon'/a/spanp/ + input type='checkbox' id='r+x+newpage' value='true'Check mebr// div; $('.scrollContainer').append(newPageData); It all appears fine, but when I click the icon, nothing happens. I have tested this script in FireFox and Opera with no problems. Any help would be appreciated. Dan
[jQuery] Re: Jcrop v0.9.0 image cropping plugin - comments please
Two words. Kick ass. But really...great job. I love the ability to skin the selection grid. I'd request only one feature, and this would admittedly be fringe. I'd love the ability to bind a doubleClick action to my form submit. Photoshop allows you to double click anywhere inside a cropping selection to run the selection. andy matthews -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Kelly Sent: Tuesday, September 09, 2008 4:35 PM To: jQuery (English) Subject: [jQuery] Jcrop v0.9.0 image cropping plugin - comments please Announcing initial release of Jcrop image cropping plugin for jQuery. This is my first plugin release, so I would appreciate any feedback. http://deepliquid.com/content/Jcrop.html Also posted to plugins.jquery.com There are some rough edges in the API and a few other minor issues. More work to do before 1.0, but what's there is pretty functional. I needed to push it out or I'd keep tinkering forever... Thanks for looking! -Kelly
[jQuery] Re: jQuery how to pronounce
jay-queer-ee -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Reinaldo JuniorZ Sent: Wednesday, September 10, 2008 8:02 AM To: jQuery (English) Subject: [jQuery] jQuery how to pronounce Hello guys, I'm goigo to give a speech on the campus about jQuery and I'm wondering what is the correct pronounce to jQuery... Any Help? Thanks
[jQuery] Re: jQuery how to pronounce
That reminds me of the how to pronounce GIF page: http://www.olsenhome.com/gif/ Incidentally, it's pronounced with a soft G, like giraffe. Not a hard G like gift. _ From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Alexandre Plennevaux Sent: Wednesday, September 10, 2008 9:12 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: jQuery how to pronounce i guess the real question becomes now: how to pronounce jay-queer-ee joke apart: hear it said by its own very creator: http://ejohn.org/blog/hacking-digg-with-firebug-and-jquery/ Alexandre Plennevaux LAb[au] http://www.lab-au.com On Wed, Sep 10, 2008 at 4:07 PM, Michael Stuhr [EMAIL PROTECTED] wrote: Reinaldo JuniorZ schrieb: Hello guys, I'm goigo to give a speech on the campus about jQuery and I'm wondering what is the correct pronounce to jQuery... Any Help? best javascript framework EVAR! :-) -- micha
[jQuery] Re: jquery is breaking iWebSite.js
Can you post a link to your site, with jQuery and the iWeb javascript code? -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of dittmer Sent: Tuesday, September 09, 2008 3:28 PM To: jQuery (English) Subject: [jQuery] jquery is breaking iWebSite.js I'm a looser. I use iWeb. Every time I add jquery to my iWeb page it breaks all the functions made by this javascript file iWebSite.js. I really know nothing about javascript (I'm a wanna be. That is why I use iWeb.) Please help.
[jQuery] Re: put image on top of another image
You don't need jQuery for this. It can be done with CSS. Here's a link that you can inspect to see what I'm talking about: http://www.commadelimited.com/code/overlapimages/ andy -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of cc96ai Sent: Tuesday, September 09, 2008 3:34 PM To: jQuery (English) Subject: [jQuery] put image on top of another image I m new on jquery, I am not can jquery can do or not I want to put a image on top of other image, e.g. we have a product image, we want to put a sign of sold or hot buy image on top , any idea how could I do it in jquery ?
[jQuery] Re: $(xx).load can't load css and js in html file on Chrome??
What's the actual code? I'm assuming you're not actually using 'xx' as your selector because that would never work. That format is reserved for accesing a specific tag. If you want to access a class, or id, then you'd need to prepend the 'xx' with either a . for a class, or # for an id. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of JOVE Sent: Monday, September 08, 2008 9:09 AM To: jQuery (English) Subject: [jQuery] $(xx).load can't load css and js in html file on Chrome?? Hello all, I use $(xx).load to load a html file that has its own css and js, on IE and Firefox, it works fine, but on Google's Chrome, I found that it can't load css and js in the html file. how can I fix it ? subpage.htm: style type=text/css . /style div/div in IE and Firefox: $(xx).load(subpage.htm); alert( $(xx).html() ); it shows: style type=text/css . /style div/div but in Chrome it shows: div/div the style lost:(
[jQuery] Re: $(xx).load can't load css and js in html file on Chrome??
Gotcha. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jove Sent: Monday, September 08, 2008 10:41 AM To: jQuery (English) Subject: [jQuery] Re: $(xx).load can't load css and js in html file on Chrome?? I' sorry, xx just a example, in actually I'm using $ (#content).load(), but the point of this topic is about .load() on Chrome.
[jQuery] Re: Fire events programmatically
As an addition to this, you can also listen for specific events, or custom events like so: $('#myDiv').bind('myCustomEvent',function(){ // do something }); -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Josh Nathanson Sent: Monday, September 08, 2008 4:11 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Fire events programmatically Isn't that the same as this: $(#ID1).trigger(change); -- Josh - Original Message - From: Huub [EMAIL PROTECTED] To: jQuery (English) jquery-en@googlegroups.com Sent: Monday, September 08, 2008 11:30 AM Subject: [jQuery] Fire events programmatically Sometimes it's needed to create an event programmatically. (Which is different from running an event function (triggering) This can be done by the following fire code var el=document.getElementById(ID1) fire(el,'change') function fire(evttype) { if (document.createEvent) { var evt = document.createEvent('HTMLEvents'); evt.initEvent( evttype, false, false); el.dispatchEvent(evt); } else if (document.createEventObject) { el.fireEvent('on' + evttype); } } looks like this trick is not yet in jQuery, perhaps for a reason? Huub Regards
[jQuery] Re: Cappucino's FlickrDemo in 45 lines of jQuery
Are you supposed to be able to open the picture and view it large? Because that's what I would expect to be able to do. That doesn't work in either version, (yours or theirs). -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ben Sargent Sent: Friday, September 05, 2008 12:23 PM To: jQuery (English) Subject: [jQuery] Cappucino's FlickrDemo in 45 lines of jQuery After reading about the release of the Cappuccino web application framework a few days ago, I thought I'd take a stab at re-implementing one of their demos in jQuery. Cappuccino is obviously a huge framework with tons of features, but I don't think jQuery can be dismissed quite so easily in favour of something so heavy. This took me about 3 hours. It's probably not perfectly optimized, and I took a few CSS shortcuts that only work in Gecko and WebKit. http://www.brokendigits.com/2008/09/05/cappucinos-flickrdemo-in-45-lines-of- jquery/ Enjoy! ben
[jQuery] Re: jQuery test suite on new Google Chrome browser
This is how Chrome reports itself: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/0.2.149.27 Safari/525.13 So you can see that the word Chrome is clearly in the UA string. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Steffan A. Cline Sent: Thursday, September 04, 2008 8:37 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: jQuery test suite on new Google Chrome browser on 9/3/08 7:19 AM, Andy Matthews at [EMAIL PROTECTED] wrote: According to getclicky.com, Chrome already has an almost 3% market share: getclicky.com/chrome/ -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Rey Bango Sent: Wednesday, September 03, 2008 9:01 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: jQuery test suite on new Google Chrome browser It's funny how quickly people begin to forget how Firefox is the only browser to-date that has been able to wrestle any market share from Microsoft and force Microsoft back to the standards table. Yep, let's find a way for Google to kill Mozilla. Good thinking Bill. Rey... Bil Corry wrote: Guy Fraser wrote on 9/3/2008 5:22 AM: I think everyone is missing the whole point of Chrome: It's designed to kill MSIE on corporate networks - http://tinyurl.com/68lvhb Converting a few FF users over and saving on the USD $60+ million Google pays Mozilla every year probably doesn't hurt either... - Bil I think that 3% is bloated. Not sure if it was here or another list but someone posted that Chrome is sending the headers for AppleWebKit Safari. It would seem google needs to change this so they can receive the actual due credit rather than reap glory at Safari's expense. Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline [EMAIL PROTECTED] Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : [EMAIL PROTECTED] GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] Re: jQuery test suite on new Google Chrome browser
According to a site called GetClicky, Chrome already has 2.8% market share: http://getclicky.com/chrome/ -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Matt Kruse Sent: Tuesday, September 02, 2008 4:49 PM To: jQuery (English) Subject: [jQuery] Re: jQuery test suite on new Google Chrome browser On Sep 2, 2:45 pm, Guyon Morée [EMAIL PROTECTED] wrote: Even though, Chrome seems to be a little bit faster than FF and quite a lot faster than IE, it has 2 failed tests: - 64: core module: text(String) (1, 3, 4) This looks like a bug in Chrome to me. It doesn't escape characters when inserting text nodes. I would have to check the specs to be sure that escaping of is required. - 112: ajax module: jQuery.param() (1, 3, 4) This appears to be a bad assumption in the jQuery tests. The code in param() calls: for ( var j in a ) and makes the assumption that the keys will be returned in the same order they are specified. This is not an assumption that should be made, so the test should be changed to allow for the returned string to be in arbitrary key order. Otherwise it's great to see that everything else passes! Surely this will be a browser that will gain user share at some point, IMO, and it's better to be ahead of the curve than playing catch-up. Matt Kruse
[jQuery] Re: jQuery test suite on new Google Chrome browser
Makes sense because Chrome is based on WebKit just like Safari. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of timothytoe Sent: Tuesday, September 02, 2008 5:49 PM To: jQuery (English) Subject: [jQuery] Re: jQuery test suite on new Google Chrome browser That sounds suspiciously like what Safari does in some cases: http://dreaminginjavascript.wordpress.com/2008/07/06/a-challenge/ On Sep 2, 2:49 pm, Matt Kruse [EMAIL PROTECTED] wrote: On Sep 2, 2:45 pm, Guyon Morée [EMAIL PROTECTED] wrote: Even though, Chrome seems to be a little bit faster than FF and quite a lot faster than IE, it has 2 failed tests: - 64: core module: text(String) (1, 3, 4) This looks like a bug in Chrome to me. It doesn't escape characters when inserting text nodes. I would have to check the specs to be sure that escaping of is required. - 112: ajax module: jQuery.param() (1, 3, 4) This appears to be a bad assumption in the jQuery tests. The code in param() calls: for ( var j in a ) and makes the assumption that the keys will be returned in the same order they are specified. This is not an assumption that should be made, so the test should be changed to allow for the returned string to be in arbitrary key order. Otherwise it's great to see that everything else passes! Surely this will be a browser that will gain user share at some point, IMO, and it's better to be ahead of the curve than playing catch-up. Matt Kruse
[jQuery] Re: New Google Browser announced
Microsoft can't retire IE6 any more than Ford could retire 1996 Ford Explorers. It has to be the user's choice. What's a better suggestion is for WEBSITES to stop supporting IE6 (coding CSS and JS fixes and workarounds) and encourage people to upgrade on their own. _ From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of chris thatcher Sent: Wednesday, September 03, 2008 6:59 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: New Google Browser announced I hope it's enough for microsoft to retire ie6, but frankly I worry a little bit about the gas giant that google is becoming. I can't see any reason they couldn't simply have given some funding to mozilla and kept providing their services as is, except... to hone their tracking of my browser behavior to improve advertisement placement. Firefox is still my sweet heart, and we're going steady. On Wed, Sep 3, 2008 at 6:17 AM, Diego A. [EMAIL PROTECTED] wrote: I love it! No non-sense web browsing. I'll still keep firefox for development of course, but I'll definitelly recommend it for general use. 2008/9/2 Giovanni Battista Lenoci [EMAIL PROTECTED] Is out! :-) -- gianiaz.net - web solutions p.le bertacchi 66, 23100 sondrio (so) - italy +39 347 7196482 -- Cheers, Diego A. -- Christopher Thatcher
[jQuery] Re: jQuery test suite on new Google Chrome browser
According to getclicky.com, Chrome already has an almost 3% market share: getclicky.com/chrome/ -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Rey Bango Sent: Wednesday, September 03, 2008 9:01 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: jQuery test suite on new Google Chrome browser It's funny how quickly people begin to forget how Firefox is the only browser to-date that has been able to wrestle any market share from Microsoft and force Microsoft back to the standards table. Yep, let's find a way for Google to kill Mozilla. Good thinking Bill. Rey... Bil Corry wrote: Guy Fraser wrote on 9/3/2008 5:22 AM: I think everyone is missing the whole point of Chrome: It's designed to kill MSIE on corporate networks - http://tinyurl.com/68lvhb Converting a few FF users over and saving on the USD $60+ million Google pays Mozilla every year probably doesn't hurt either... - Bil
[jQuery] Re: I don't want to downoad a plugin
Is there a reason you don't want to download the library, or plugins? -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of jjsanders Sent: Wednesday, September 03, 2008 9:09 AM To: jQuery (English) Subject: [jQuery] I don't want to downoad a plugin Currently I use jQuery and haven't downloaded the library, rather I am using the online version. So I have a link to my jQuery library. script type=text/javascript src=http://ajax.googleapis.com/ajax/ libs/jquery/1.2.6/jquery.min.js/script But now I want to use the UI tabs plugin. (http://docs.jquery.com/UI/ Tabs) Does anyone know wether it is possible to use this in the same way so that I don't need to download the package?
[jQuery] Re: jQuery test suite on new Google Chrome browser
They started with a brand new codebase. No bloat from stuff that's unused or inefficient. _ From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Wednesday, September 03, 2008 3:38 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: jQuery test suite on new Google Chrome browser I wonder how come google load pages half the time that firefox 3.0 does ... thats so interesting.. right now I use firefox for its firebug and plugins and I use safari 3 because it takes small memory... it is amazing that CHrone has 3% of hits in the internet
[jQuery] Re: jquery for web designers
John... You could focus on some of the things which can be condensed in the document using jQuery. For example. In an app I'm writing, I want rounded corners on some of my containers but both the color of the container, and the background against which it is displayed are dynamic, so I couldn't used an image. What I came up with was to stack 2 divs before, and 2 after my main container like so: div class=short/div div class=medium/div div id=contentBody my content /div div class=medium/div div class=short/div That gives a nice, subtle rounded corner effect while still letting me colorize the elements. Now, with jQuery my HTML is plain vanilla: div id=contentBody my content /div While my jQuery code looks like this: $('#headerBody') .before('div class=short/div') .before('div class=medium/div') .after('div class=short/div') .after('div class=medium/div'); -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of john teague Sent: Thursday, August 28, 2008 10:30 PM To: jQuery (English) Subject: [jQuery] jquery for web designers I'm giving a presentation to a group of web designers who are very comfortable with css, but haven't done much with javascript. I'm looking for suggestions for features I should focus on (besides the obvious selector syntax) that would be relevant to what they normally do. Thanks, John Teague
[jQuery] Re: Transfer effect in UI
I can confirm this. The Transfer effect doesn't work in Safari 3 for the PC. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Thursday, August 28, 2008 7:41 AM To: jQuery (English) Subject: [jQuery] Transfer effect in UI Dear folk , I tested the Transfer effect in http://ui.jquery.com/repository/latest/demos/functional/#ui.effects.general on Safari 3 , it doesn't work what is the problem ... I would like to use Transfer Effect Regards Pedram
[jQuery] Change event for hidden form field
I'm modifying the value of a hidden input field from a popup window. I thought it would be a simple thing to bind a change event on this field so that when it's value changed, something else would happen. This doesn't seem to work. Am I doing something wrong, or am I misunderstanding what I need to do? Or is there another way to do this, one that's better? In essence, this is what I'm doing. 1) Open a new window 2) In this new window, click a link which corresponds to an image 3) In the new window, get the filename of the selected image; pass it back to a specified hidden input field in the parent window. 4) When the hidden input field's value changes, fire an event/function which changes the src attribute of an img tag to match the value of the hidden form field. Any ideas? The value of the input field updates properly, but it just doesn't fire the change handler. Andy Matthews Senior ColdFusion Developer Office: 615.627.9747 Fax: 615.467.6249 www.dealerskins.com http://www.dealerskins.com/ Total customer satisfaction is my number 1 priority! If you are not completely satisfied with the service I have provided, please let me know right away so I can correct the problem, or notify my manager Aaron West at [EMAIL PROTECTED] 2008 Email NADA.jpg
[jQuery] Re: Change event for hidden form field
Something I forgot to add. The change event that I bound does fire correctly when I manually change the value of the field (I changed it's type from hidden to text for testing). _ From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Andy Matthews Sent: Thursday, August 28, 2008 10:25 AM To: [jQuery] Subject: [jQuery] Change event for hidden form field I'm modifying the value of a hidden input field from a popup window. I thought it would be a simple thing to bind a change event on this field so that when it's value changed, something else would happen. This doesn't seem to work. Am I doing something wrong, or am I misunderstanding what I need to do? Or is there another way to do this, one that's better? In essence, this is what I'm doing. 1) Open a new window 2) In this new window, click a link which corresponds to an image 3) In the new window, get the filename of the selected image; pass it back to a specified hidden input field in the parent window. 4) When the hidden input field's value changes, fire an event/function which changes the src attribute of an img tag to match the value of the hidden form field. Any ideas? The value of the input field updates properly, but it just doesn't fire the change handler. Andy Matthews Senior ColdFusion Developer Office: 615.627.9747 Fax: 615.467.6249 www.dealerskins.com http://www.dealerskins.com/ Total customer satisfaction is my number 1 priority! If you are not completely satisfied with the service I have provided, please let me know right away so I can correct the problem, or notify my manager Aaron West at [EMAIL PROTECTED] 2008 Email NADA.jpg
[jQuery] Re: Change event for hidden form field
Brian... The page in question has image upload built into the list of images to be selected from. So that wouldn't work. However, the function call that you suggested is what I ended up using. Thanks for the feedback...appreciated. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Brian Schilt Sent: Thursday, August 28, 2008 11:57 AM To: jQuery (English) Subject: [jQuery] Re: Change event for hidden form field I would recommend replacing the pop up window with an in-page modal window (http://ui.jquery.com/repository/latest/demos/functional/ #ui.dialog). The modal windows these days are advanced enough to function much like a pop up window with draggable, resizable, scolling and whatnot. This would be easy to do if you were to use a modal window because once hidden form field is populated you can us jQuery's event trigger method (http://docs.jquery.com/Events/trigger#typedata) to make it happen. If you absolutely need to use the pop up window then have the new window call a function in the parent window. This function can execute a trigger. //this function is in the parent window. function triggerHiddenFormField() { $('$hiddenFormField').trigger('change'); } //pop up window calls the the parent window's function window.opener.triggerHiddenFormField(); brian On Aug 28, 11:40 am, Andy Matthews [EMAIL PROTECTED] wrote: Something I forgot to add. The change event that I bound does fire correctly when I manually change the value of the field (I changed it's type from hidden to text for testing). _ From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Andy Matthews Sent: Thursday, August 28, 2008 10:25 AM To: [jQuery] Subject: [jQuery] Change event for hidden form field I'm modifying the value of a hidden input field from a popup window. I thought it would be a simple thing to bind a change event on this field so that when it's value changed, something else would happen. This doesn't seem to work. Am I doing something wrong, or am I misunderstanding what I need to do? Or is there another way to do this, one that's better? In essence, this is what I'm doing. 1) Open a new window 2) In this new window, click a link which corresponds to an image 3) In the new window, get the filename of the selected image; pass it back to a specified hidden input field in the parent window. 4) When the hidden input field's value changes, fire an event/function which changes the src attribute of an img tag to match the value of the hidden form field. Any ideas? The value of the input field updates properly, but it just doesn't fire the change handler. Andy Matthews Senior ColdFusion Developer Office: 615.627.9747 Fax: 615.467.6249www.dealerskins.comhttp://www.dealerskins.com/ Total customer satisfaction is my number 1 priority! If you are not completely satisfied with the service I have provided, please let me know right away so I can correct the problem, or notify my manager Aaron West at [EMAIL PROTECTED] 2008 Email NADA.jpg 17KViewDownload
[jQuery] Re: Dan Switzer's Autocomplete plugin - can I do this...
Dan... I think it might actually work without those changes you suggested. Problem is that at the point I'm calling the plugin, it doesn't recognize showResults as a method: $(#category).autocompleteArray( // this array comes from the coupons_edit.cfm file catArray, { delay:10, minChars:0, matchSubset:1, onItemSelect:selectItem, onFindValue:findValue, autoFill:true, maxItemsToShow:10 } ).click(function(){ showResults(); }); When I click the input field, I get an error: showResults is not defined http://testlogin.dealerskins.loc/admin/coupons/js/coupon_edit.js Line 130 Any ideas? Also, is Jörn's plugin listed on the jQuery site? andy -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dan G. Switzer, II Sent: Thursday, August 28, 2008 11:17 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Dan Switzer's Autocomplete plugin - can I do this... Andy, First I'd recommend updating to latest version that Jörn's been managing. I have no plans on updating my version. I'm using Dan's autocomplete plugin in an app and it's working great. I just have one question. I'm loading in all options (around 5-10) into an array when the page loads. I'd like to trigger the list selection screen when the user clicks into the text field. Is this possible? So if I've got the following in my array: [Accessories,Interior,Maintenance,Parts,Service,Tires,Vehi cle Sales] I'd like all of those items to display when the user clicks the text field. Then, as they type, it would filter out other options. Or of course they could select it straight away, or type their own. I thought it would be enough to put a click handler on the input field like so: .click(function(){ showResults(); }); but that doesn't work. Anyone? Dan? I think you might be able to hack it the way you want by changing the line: var prev = ; to: var prev = null; And then you'd need the to set the option minChars to 0. I haven't tested this and don't know what else this might impact. -Dan
[jQuery] Re: Dan Switzer's Autocomplete plugin - can I do this...
There we go. It's no big deal. Just thought it would be a nice addition. Thanks for checking it out Dan. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dan G. Switzer, II Sent: Thursday, August 28, 2008 2:37 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Dan Switzer's Autocomplete plugin - can I do this... Andy, I think it might actually work without those changes you suggested. Problem is that at the point I'm calling the plugin, it doesn't recognize showResults as a method: That's a private function that only the plug-in can access. -Dan
[jQuery] Re: Hiding other divs when I show one
Do you have a link you can provide? Something online? -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of illtron Sent: Wednesday, August 27, 2008 8:37 AM To: jQuery (English) Subject: [jQuery] Hiding other divs when I show one I'm working on a script, and I've got it working about halfway. The page will show a bunch of panels, and clicking a link hides a text div and shows a form. Here's the jQuery. Right now, it toggles the searchform and panel_text divs in the same searchpanel div. I'd like to have it so that when you show the form for a different searchpanel, it will hide any other currently visible searchform. So for example, if I come to the page and click to reveal the form in #panel1, I want panel 1 to go back to showing the text when I show the form for #panel2. While I'm at it, can we fade out instead of just switching these? Thanks! $(document).ready(function(){ $(.searchpanel .searchform).hide(); // hide the forms $(a.showform).click(function(){ $(this).siblings(.searchform).toggle(); $(this).siblings(.panel_text).toggle(); return false; }); }); Here's some example HTML, set up pretty much the same as my actual html, just simplified a bit. div id=searchbox div class=searchpanel id=panel1 a class=showformClick to toggle/a div class=panel_textText/div div class=searchformForm/div /div div class=searchpanel id=panel2 a class=showformClick to toggle/a div class=panel_textText/div div class=searchformForm/div /div div class=searchpanel id=panel3 a class=showformClick to toggle/a div class=panel_textText/div div class=searchformForm/div /div div class=searchpanel id=panel4 a class=showformClick to toggle/a div class=panel_textText/div div class=searchformForm/div /div /div
[jQuery] Dan Switzer's Autocomplete plugin - can I do this...
I'm using Dan's autocomplete plugin in an app and it's working great. I just have one question. I'm loading in all options (around 5-10) into an array when the page loads. I'd like to trigger the list selection screen when the user clicks into the text field. Is this possible? So if I've got the following in my array: [Accessories,Interior,Maintenance,Parts,Service,Tires,Vehicle Sales] I'd like all of those items to display when the user clicks the text field. Then, as they type, it would filter out other options. Or of course they could select it straight away, or type their own. I thought it would be enough to put a click handler on the input field like so: .click(function(){ showResults(); }); but that doesn't work. Anyone? Dan? Andy Matthews Senior ColdFusion Developer Office: 615.627.9747 Fax: 615.467.6249 www.dealerskins.com http://www.dealerskins.com/ Total customer satisfaction is my number 1 priority! If you are not completely satisfied with the service I have provided, please let me know right away so I can correct the problem, or notify my manager Aaron West at [EMAIL PROTECTED] attc0ada.jpg
[jQuery] Re: Problem with Tutorials:How jQuery Works
Oh?! You mean I have to include jQuery before the examples will work? :) I've done that before without realizing it. _ From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Karl Swedberg Sent: Tuesday, August 26, 2008 8:20 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Problem with Tutorials:How jQuery Works Hi there, First thing to do is make sure the reference to the jquery.js file is correct. That sort of error usually occurs when it can't find the jquery.js file. In Firefox, open the script tab in Firebug (If you don't have this extension, get it here: http://www.getfirebug.com/ ) and click on the file name heading. you should see two file names, one for jquery.js and one for the current html page. Select the jquery.js file and look in the Script inspector to see if it's giving you a 404. You'll probably want to add a return false; after the alert line, too. --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Aug 26, 2008, at 8:41 AM, Caveman wrote: I'm having a problem running the first simple example in this tutorial. here is my code: html head script type=text/javascript src=js/jquery.js/script script type=text/javascript $(document).ready(function(){ $(a).click(function(){ alert(Thanks for visiting!); }); }); /script /head body a href=http://jquery.com/;jQuery/a /body /html Seems pretty simple but does not work for me in IE 7, firefox, or Opera. I am running this in IIS on my XP Pro box. IE just gives me the error Object Expected.
[jQuery] Re: input:empty and remember password
This is what someone on this list gave me about 2 weeks ago: // the focus / blur functionality of the text input // fields for the email a friend form. $('#input.email').bind('focus', function() { // Set the default value if it isn't set if ( !this.defaultValue ) this.defaultValue = this.value; // Check to see if the value is different if ( this.defaultValue this.defaultValue != this.value ) return; // It isn't, so remove the text from the input this.value = ''; }) .bind('blur', function() { // If the value is blank, return it to the defaultValue if ( this.value.match(/^\s*$/) ) this.value = this.defaultValue; }); -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of sperks Sent: Monday, August 25, 2008 3:26 PM To: jQuery (English) Subject: [jQuery] input:empty and remember password I have a script that displays username and password as background images in the input fields when the field is empty and they removes it when on focus (or when there's content left in the field). I then came up against the issue where if someone's browser populates the input fields after their browser is asked to remember their password and I end up with both the input fields being populated and the background showing. Here's my initial script: $(document).ready(function() { $('#loginArea').addClass('active'); $('#loginArea.active input') .focus(function() { $(this).addClass(nobg); }) .blur(function() { if ($(this).val() == '') { $(this).addClass(nobg); }; }); }); I tried using $('#loginArea.active input:empty').removeClass(nobg); but FF doesn't add the username/password until after the page has loaded (I don't know what other browsers are doing), and thus the decision to addClass is based on empty cells. Anyone have an idea of how to resolve this one?
[jQuery] Best way to toggle a form field value
I'm storing a boolean in a hidden field, and I'd like to flip it's value when someone clicks a link. Here's the function I've got currently: function toggleInput($el) { // get the ID of the element being passed in var id = $el.attr('id'); // get form element var $formEl = $('input[name=' + id + ']'); // get the current value of the selected form field var value = $formEl.val(); // set the new value $formEl.val(!value); alert(value); } I seem to recall a way to invert the value in one line, but it's eluding me at this time. Can someone help me out? Andy Matthews Senior ColdFusion Developer Office: 615.627.9747 Fax: 615.467.6249 www.dealerskins.com http://www.dealerskins.com/ Total customer satisfaction is my number 1 priority! If you are not completely satisfied with the service I have provided, please let me know right away so I can correct the problem, or notify my manager Aaron West at [EMAIL PROTECTED] 2008 Email NADA.jpg
[jQuery] Re: Best way to toggle a form field value
Anyone have input on this? This code runs, but it doesn't seem to want to toggle the value of the form field at all. It changes it once, then continues using the same value. _ From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Andy Matthews Sent: Thursday, August 21, 2008 9:03 AM To: [jQuery] Subject: [jQuery] Best way to toggle a form field value I'm storing a boolean in a hidden field, and I'd like to flip it's value when someone clicks a link. Here's the function I've got currently: function toggleInput($el) { // get the ID of the element being passed in var id = $el.attr('id'); // get form element var $formEl = $('input[name=' + id + ']'); // get the current value of the selected form field var value = $formEl.val(); // set the new value $formEl.val(!value); alert(value); } I seem to recall a way to invert the value in one line, but it's eluding me at this time. Can someone help me out? Andy Matthews Senior ColdFusion Developer Office: 615.627.9747 Fax: 615.467.6249 www.dealerskins.com http://www.dealerskins.com/ Total customer satisfaction is my number 1 priority! If you are not completely satisfied with the service I have provided, please let me know right away so I can correct the problem, or notify my manager Aaron West at [EMAIL PROTECTED] 2008 Email NADA.jpg
[jQuery] Re: How to set background image when file name contains a space?
Spaces in file names for web apps are asking for trouble. Any way of getting around having the spaces ? -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Thursday, August 21, 2008 2:03 PM To: jQuery (English) Subject: [jQuery] How to set background image when file name contains a space? Hi, I have an image with path '/documentengine/user/xhuntertest/ Uploaded_Documents/Toad Getting Started Guide1_thumb.jpg'. When I try and set this as the background of my DIV using $('#frontside').css('backgroundImage','url(' + img +')'); where img contains the offending name, nothing appears. I figure this has something to do with the space in the file name as other images without a space appear just fine. Grateful for any advice, - Dave
[jQuery] Toggling boolean values in form fields
I'm storing a boolean in a hidden field, and I'd like to flip it's value when someone clicks a link. Here's the function I've got currently: HTML: input type=hidden name=saveAsTemplate value=0 / TRIGGER: a href= id=saveAsTemplate class=toggleImageSave as template/a JAVASCRIPT: $('.toggleImage').each(function(){ // shortcut to the current element var $this = $(this); // toggle the click handler $this.toggle(function(){ // toggle the check image to the on state toggleImage($this,'save'); toggleInput($this); },function(){ // toggle the check image to the off state toggleImage($this,'save_faded'); toggleInput($this); }); }); function toggleInput($el) { // get the ID of the element being passed in var id = $el.attr('id'); // get form element var $formEl = $('input[name=' + id + ']'); // get the current value of the selected form field var value = $formEl.val(); // set the new value $formEl.val(!value); alert(value); } Does anyone know why this isn't working right or, at some times, at all? Andy Matthews Senior ColdFusion Developer Office: 615.627.9747 Fax: 615.467.6249 www.dealerskins.com http://www.dealerskins.com/ Total customer satisfaction is my number 1 priority! If you are not completely satisfied with the service I have provided, please let me know right away so I can correct the problem, or notify my manager Aaron West at [EMAIL PROTECTED] 2008 Email NADA.jpg