[jQuery] Re: Name Panels instead of calling them by #number
What do you mean with panels? I'm not sure if it is what you are searching for, but if you have: div a name=contact... ... /div you can use $('a[name=contact]:parent') to get your surrounding div. However using an ID instead of the attribute search (name=...) will be much faster. by(e) Stephan 2009/1/25 td t...@gmx.de: Hi, is there a possibility to really name the panels somehow? I would like to have links like this: a href=#contact class=cross-link title=contact with the anchor inside the associated div. to get the side easier to search for searchengines.
[jQuery] Re: Hover Effect on 2 rows
kevind schrieb: how do get the 2 TR's to highlight together at the same time when i float over the class 'Row' ? Do i surround them with DIVs or SPAN? Is this possible to group 2 table rows inside another element and get the function to fire for both. Give this a try: $(function(){ $('.Row').hover(function(){ $(this, .AltRow).addClass('hover'); }, function(){ $(this, .AltRow).removeClass('hover'); }) -- Viele Grüße, Olaf --- olaf.bo...@t-online.de http://olaf-bosch.de/ http://ohorn.info/ http://www.akitafreund.de/ ---
[jQuery] Re: [validate] dynamic message
Try this workaround - update validator.settings.messages[element.name] with the appropiate value inside your validation method: $.validator.addMethod(dynamic_check, function(value, element, param) { if(incorrect(value, param)){ this.settings.messages[element.name] = some dynamic message + dynamicValue; return false; } }, whatever)); On Sun, Jan 25, 2009 at 10:33 PM, thomas thomas.bik...@gmail.com wrote: Thanks Jörn, but is there a way to change param dynamically during JS runtime? As example in your custom-methods-demo.html I'd like 11 to be a function of value ... math: {equal: 11} In my barcoding example, I'd like not only tell user that barcode number is wrong, but also what the check digit should be for what he has typed. In order to pass it into template Entered number is wrong the check digit must be {0} I need to be able to alter param somehow ... Regards, Thomas On Jan 25, 2:29 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: You can use $.format to create dynamic messages, but that works only when the dynamic part is specified as a parameter. $.validator.addMethod(dynamic_check, function(value, element, param) { if(incorrect(value, param)){ return false;} }, $.format('dynamic message goes here with param {0}')); Jörn On Sat, Jan 24, 2009 at 10:54 AM, thomas thomas.bik...@gmail.com wrote: Hello group! Very happy to have deployed validation plugin ( I mostly need to check validity of EAN/UPC numbers for barcode generation). You can see it in action here:http://www.barcoderobot.com/ean-13.html The question I am struggling with though is howto return a 'dynamically generated' message. Say, '13 digits are required, you have XX'? $.validator.addMethod(dynamic_check, function(value) { if(_value is incorrect_){ return False;} }, 'dynamic message goes here');
[jQuery] Re: Hover Effect on 2 rows
Hi Kevin, NO, you can not wrap your tr's with div's or span's. Unfortunately Olaf's script will not work also. A little ugly script should do the job: $(function(){ $('.Row').hover(function(){ $(this).addClass('hover'); getNeighbor(this, 'Row').addClass('hover'); }, function(){ $(this).removeClass('hover'); getNeighbor(this, 'Row').removeClass('hover'); }) $('.AltRow').hover(function(){ $(this).addClass('hover'); getNeighbor(this, 'AltRow').addClass('hover'); }, function(){ $(this).removeClass('hover'); getNeighbor(this, 'AltRow').removeClass('hover'); }) }); function getNeighbor(el, cls){ if($(el).prev().hasClass(cls)) return $(el).prev(); if($(el).next().hasClass(cls)) return $(el).next(); } Read jQuery HowTo Resource - http://jquery-howto.blogspot.com On Mon, Jan 26, 2009 at 5:45 AM, kevind kevint...@gmail.com wrote: hi, i'm using JQuery to add a Class when a row is hovered over - i have it working, however, each row of data has 2 rows in the table - I want to have both rows change background color whenever i hover over either of them. The table already has 'stripes' for alternating records and readability. I'm using function: = $(function(){ $('.Row').hover(function(){ $(this).addClass('hover'); }, function(){ $(this).removeClass('hover'); }) $('.AltRow').hover(function(){ $(this).addClass('hover'); }, function(){ $(this).removeClass('hover'); }) = the table structure looks like this: table class=Grid cellspacing=0 cellpadding=0 tr class=Caption thComment/th thCreated/th /tr tr class=Row tdnbsp;/td tdnbsp;/td /tr tr class=Row tdnbsp;/td tdnbsp;/td /tr !-- -- tr class=AltRow tdnbsp;/td tdnbsp;/td /tr tr class=AltRow tdnbsp;/td tdnbsp;/td /tr /table == the individual rows highlight using STYLE of ' tr.hover td {background:yellow;} ' how do get the 2 TR's to highlight together at the same time when i float over the class 'Row' ? Do i surround them with DIVs or SPAN? Is this possible to group 2 table rows inside another element and get the function to fire for both. thanks in advance for any help
[jQuery] Re: [autocomplete] Problem with .result
It dosen't work. For example: I use tab key to navigate. If focus is set to input, id will be empty. If I don't want change my input, id also shouldn't be change. IAnother example: If my result work and set id properly, if I keypress shift or ctrl, id field will be cleared. On 24 Sty, 00:20, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: You could add another keyup-event-handler to the input field, and clear the id field. As long as that runs before the result-handler is setting the data, it should give you the result you need. Jörn On Fri, Jan 23, 2009 at 5:09 PM, Styx pawel.chuchm...@gmail.com wrote: Hi. I have two fileds. For exmple: $(#name).autocomplete('seatch.php'); $(#id).result(function(event, data, formatted) { if (data) { $(#id).val(data[1]); } If i select sometfing in autocomplete field, my id field will have id of this item. After submit I have two fields - one wieth name, and one with id. I can for example update dabase use id. But if I write in autocomplete somethig, which isn't in result, my function isn't triggered. If i edit existing data, after submit I have field id with some value, and filed name with new value. I don't know, that I shoul add my name to database, or do something else. What I should do to clear field id when name is write by me and dosen't exist in result of 'search.php'? regards, pch
[jQuery] Re: Problem with Jcarousel and Safari: next button disabled
Hi. I had a similar problem in safari but have not been able to find a solution to it. Contacted the author also but no reply from him either. Will let you know if i find a solution to it. On Jan 26, 2:33 am, kinesias talk2matth...@googlemail.com wrote: Hi, please check outhttp://www.mirox-media.com/blog_add/media/data/film_festivals.html When loading it the first time into safari, the next button and the dot array at the top are disabled. It works only if you click on the refresh button in safari a couple of times. Can anyone help?? thank you very much, Matthias
[jQuery] Re: change certain elements in result set based on position
You can loop over the colors also just by using the modulo operator instead: $('a').each(function(i){ i = ++i % 4; var color = i == 1 ? 'red' : //first 4 i == 2 ? 'blue' : //second group of 4 i == 3 ? 'yellow' : // third group 'lime'; //fourth group and so on $(this).css('backgroundColor', color); }); On 23 jan, 15:38, devilmike devilm...@gmail.com wrote: Awesome Ricardo, thanks! I guess the only issue I have is that I'll never know how many sets of4 I'll be dealing with, and i apologize for not explaining myself very well in my example. Basically for each set, I want to run the same function. This is what I came up with. It works, but I'm a bit concerned about the amount of looping going on. Your code seems much cleaner... var result = $('a'); var theCount =4; //variable passed in var oldCount = -1; var theRow = result; while (theRow.length 1){ theRow = jQuery.grep(result, function(n, i){ return (n i theCount i oldCount ); }); oldCount = theCount - 1; theCount = theCount +4; $(theRow).each(function(i, o){ // do something to each item of each set}); }
[jQuery] Re: Hover Effect on 2 rows
There is a simpler way: $('.Row').each(function(){ var t = $(this), n = t.next('.Row'), direction = n.length ? 'next' : 'prev'; $(this).hover(function(){ t[direction]('.Row').andSelf().children('td').css ('background','red'); },function(){ t[direction]('.Row').andSelf().children('td').css ('background','yellow'); }); }); You could do it directly inside the hover() function, without each(), but cacheing the objects will improve performance. cheers, - ricardo On Jan 26, 8:29 am, jQuery Lover ilovejqu...@gmail.com wrote: Hi Kevin, NO, you can not wrap your tr's with div's or span's. Unfortunately Olaf's script will not work also. A little ugly script should do the job: $(function(){ $('.Row').hover(function(){ $(this).addClass('hover'); getNeighbor(this, 'Row').addClass('hover'); }, function(){ $(this).removeClass('hover'); getNeighbor(this, 'Row').removeClass('hover'); }) $('.AltRow').hover(function(){ $(this).addClass('hover'); getNeighbor(this, 'AltRow').addClass('hover'); }, function(){ $(this).removeClass('hover'); getNeighbor(this, 'AltRow').removeClass('hover'); }) }); function getNeighbor(el, cls){ if($(el).prev().hasClass(cls)) return $(el).prev(); if($(el).next().hasClass(cls)) return $(el).next(); } Read jQuery HowTo Resource - http://jquery-howto.blogspot.com On Mon, Jan 26, 2009 at 5:45 AM, kevind kevint...@gmail.com wrote: hi, i'm using JQuery to add a Class when a row is hovered over - i have it working, however, each row of data has 2 rows in the table - I want to have both rows change background color whenever i hover over either of them. The table already has 'stripes' for alternating records and readability. I'm using function: = $(function(){ $('.Row').hover(function(){ $(this).addClass('hover'); }, function(){ $(this).removeClass('hover'); }) $('.AltRow').hover(function(){ $(this).addClass('hover'); }, function(){ $(this).removeClass('hover'); }) = the table structure looks like this: table class=Grid cellspacing=0 cellpadding=0 tr class=Caption thComment/th thCreated/th /tr tr class=Row tdnbsp;/td tdnbsp;/td /tr tr class=Row tdnbsp;/td tdnbsp;/td /tr !-- -- tr class=AltRow tdnbsp;/td tdnbsp;/td /tr tr class=AltRow tdnbsp;/td tdnbsp;/td /tr /table == the individual rows highlight using STYLE of ' tr.hover td {background:yellow;} ' how do get the 2 TR's to highlight together at the same time when i float over the class 'Row' ? Do i surround them with DIVs or SPAN? Is this possible to group 2 table rows inside another element and get the function to fire for both. thanks in advance for any help
[jQuery] Re: Hover Effect on 2 rows
oops. posted my testing code. here's the right one: $('.Row').each(function(){ var t = $(this), n = t.next('.Row'), direction = n.length ? 'next' : 'prev'; t.hover(function(){ t[direction]('.Row').andSelf().addClass('hover'); },function(){ t[direction]('.Row').andSelf().removeClass('hover'); }); }); On Jan 26, 10:21 am, Ricardo Tomasi ricardob...@gmail.com wrote: There is a simpler way: $('.Row').each(function(){ var t = $(this), n = t.next('.Row'), direction = n.length ? 'next' : 'prev'; $(this).hover(function(){ t[direction]('.Row').andSelf().children('td').css ('background','red'); },function(){ t[direction]('.Row').andSelf().children('td').css ('background','yellow'); }); }); You could do it directly inside the hover() function, without each(), but cacheing the objects will improve performance. cheers, - ricardo On Jan 26, 8:29 am, jQuery Lover ilovejqu...@gmail.com wrote: Hi Kevin, NO, you can not wrap your tr's with div's or span's. Unfortunately Olaf's script will not work also. A little ugly script should do the job: $(function(){ $('.Row').hover(function(){ $(this).addClass('hover'); getNeighbor(this, 'Row').addClass('hover'); }, function(){ $(this).removeClass('hover'); getNeighbor(this, 'Row').removeClass('hover'); }) $('.AltRow').hover(function(){ $(this).addClass('hover'); getNeighbor(this, 'AltRow').addClass('hover'); }, function(){ $(this).removeClass('hover'); getNeighbor(this, 'AltRow').removeClass('hover'); }) }); function getNeighbor(el, cls){ if($(el).prev().hasClass(cls)) return $(el).prev(); if($(el).next().hasClass(cls)) return $(el).next(); } Read jQuery HowTo Resource - http://jquery-howto.blogspot.com On Mon, Jan 26, 2009 at 5:45 AM, kevind kevint...@gmail.com wrote: hi, i'm using JQuery to add a Class when a row is hovered over - i have it working, however, each row of data has 2 rows in the table - I want to have both rows change background color whenever i hover over either of them. The table already has 'stripes' for alternating records and readability. I'm using function: = $(function(){ $('.Row').hover(function(){ $(this).addClass('hover'); }, function(){ $(this).removeClass('hover'); }) $('.AltRow').hover(function(){ $(this).addClass('hover'); }, function(){ $(this).removeClass('hover'); }) = the table structure looks like this: table class=Grid cellspacing=0 cellpadding=0 tr class=Caption thComment/th thCreated/th /tr tr class=Row tdnbsp;/td tdnbsp;/td /tr tr class=Row tdnbsp;/td tdnbsp;/td /tr !-- -- tr class=AltRow tdnbsp;/td tdnbsp;/td /tr tr class=AltRow tdnbsp;/td tdnbsp;/td /tr /table == the individual rows highlight using STYLE of ' tr.hover td {background:yellow;} ' how do get the 2 TR's to highlight together at the same time when i float over the class 'Row' ? Do i surround them with DIVs or SPAN? Is this possible to group 2 table rows inside another element and get the function to fire for both. thanks in advance for any help
[jQuery] How to display tips by creating a jQuery plugin
Hi there! One more tutorial to share with you guys... We are going to learn how to create our custom jQuery plugin to show tips on mouse over event on our desired elements. We will also be able to customize the appearence of the tip division for each kind of elements in the CSS code and much more: http://yensdesign.com/2009/01/how-to-display-tips-creating-jquery-plugin/ I hope you can use it to improve your projects as always :D
[jQuery] Closing the modal pop up programmatically
Hi all. I see the obvious simplemodal-close class, which by default will close the modal object. However, the problem I am having is that the modal div's html is being populated by an ajax call for a remote page. The response'd HTML contains the simplemodal-close class, however its not being parsed because it is being loaded after the modal object's creation. So to recap: simplemodal-close works fine for items parsed at creation, however when loading html from a remote source using an ajax call; it fails because it doesn't parse the response'd html. Any ideas on how to attach the event OR to call the close method directly? I have tried things like $('#modalDiv').modal().close() however to no avail. Thanks in advance... Tim
[jQuery] Problem with animate callback
Hi, I have function which animates div#square and insert link in this div (via animate callback): function resizeSquare() { var $square = $('#square'); $square.animate({ width: 300px, marginLeft: -150px}, 800) .animate({ height: 400px, marginTop: -200px}, 800, function() { $(this).html('a href=# class=clickedclicked/a'); }); } and then I want to display alert after click on this inserted link. This is a function doing this: function showAlert() { $('a.clicked').click(function() { alert(Display me!); return false; }); } Unfortunately it doesn't work. If I insert this link outside animate callback it's ok. Anyone can help? With regards, dreame4
[jQuery] Problem with animate callback
Hi, I have sth like this: function resizeSquare() { var $square = $('#square'); $square.animate({ width: 300px, marginLeft: -150px}, 800) .animate({ height: 400px, marginTop: -200px}, 800, function() { $(this).html('a href=# class=clickedclicked/a'); }); } In second animate function I use callback to insert link in div#square. And everything is ok. Then I want to display alert after clicking on this link, but nothing happens. This is function which should display alert: function showAlert() { $('a.clicked').click(function() { alert(Display me!); return false; }); } If I insert this link outside animate callback everything is ok. So, I'm doing sth wrong or it's jquery bug/behavior? And I use jQ 1.3.1. With regards, dreame4
[jQuery] SlideViewer
Hi, all I'm using SlideViewer plugin. is it possible to have autoplay for the gallery with play, pause , next and previous buttons. thanks in advance Rakesh
[jQuery] Re: Form Plugin with file upload
I've set up a page here: http://www.paperdemon.com/tests/commentsclass.php log in with the following info: login: t...@yahoo.com password: p455w0rd After Logging in, click on Post a Comment and type a message and select a jpg image to upload. Then hit submit. In Firefox, when a file is attached, the beforeSubmit AND success handler are called. However, the POST action does not appear in Firebugs Net XHR panel so it seems that the post is not sent. I figured out that the reason why my form is suddenly disappearing is because in my success callback it is trying to grab message from the responseXML but since the POST isn't really being sent, there is a blank response. What I meant by this is since the POST didn't really get sent, responseXML has nothing in it. When I do alert(message); it does not say 'null' (which i think js would do if a var was null, right?). instead its just blank. File uploads do not use ajax, so you will not see an entry in the xhr panel. Not sure what you mean by the 'blank response'. Is the responseXML null? Is the returned XML valid? Well, the form plugin says it supports file uploads. I'm not sure how its supposed to work. The documentation mentions something about an iframe but I don't completely understand what it is I have to do in my code to get the upload action to work. (click on file uploads tab) http://malsup.com/jquery/form/#code-samples Thank you very much for your help! -- View this message in context: http://www.nabble.com/Form-Plugin-with-file-upload-tp21181087s27240p21659989.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Jquery pagination plugin problem
Hi all, I am playing with the pagination plugin (http://plugins.jquery.com/ node/5912) and cannot figure out how to change number of items showing on a single page. Changing the param items_per_page changes the number of page links (navigation), but still shows a single item on a page. You may play with the demo.htm from the download to see what I am talking about.. Has someone faced the same problem? Any suggestions how to fix this?
[jQuery] Select Display image
I am looking for a jquery plugin which allows me to select an image for display. I want something similar as MSN messenger provides for selecting display image. When I click browse button an image gallery open up in a popup which should display uploaded images with proper directory structure. I select one of them and display it on Parent html page. Is there any thing closer available in jquery? Thanks.
[jQuery] Validating reCaptcha using JQuery before sending via $.post
Hi, Is there a way to validate a visitors reCaptcha input using JQuery before sending the form? I can't see any way I can do it. Can anytone help? Thanks
[jQuery] Event delegation and hover(over, out)
Hi, I'm appending elements to a list and want to attach a hover-event (show or hide image) to links inside of that list-element. The HTML ist: ul class=removable lia href=#1img style=display: none; src=icon_remove.gif / /a/li lia href=#2img style=display: none; src=icon_remove.gif / /a/li lia href=#3img style=display: none; src=icon_remove.gif / /a/li lia href=#4img style=display: none; src=icon_remove.gif / /a/li /ul And here is the jQuery: $(ul.removable li a).hover( function(){ $('img', this).fadeIn(fast); }, function(){ $('img', this).fadeOut(fast); } ); Works like a charm. Until I add list-elements. The most elegant way to work around that seems to be event delegation, which I was able to use when removing list-elements: $(ul.removable).click(function(event){ if($(event.target).parent().is('li')) $(event.target).fadeOut(fast); return false; }); Now the question: How does this work with hover(over, out)? It should have been something like: $(ul.removable).hover( function(event){ if($(event.target).parent().is('li')) { $(event.target).children().fadeIn(fast); } }, function(event){ ... } ); But it just notices that I'm hovering the unordered list. I'm now thinking that event delegation simply doesn't work with hover and came up with this (thanks to jQuery 1.3.1): // show remove me-Icons (attached with .live) $(ul.removable li a).live(mouseover, function(){ $('img', this).fadeIn(fast); } ); // show remove me-Icons (attached with .live) $(ul.removable li a).live(mouseout, function() { $('img', this).fadeOut(fast); } ); I'm eager to learn how to write more elegant and simple jQuery, so: Any improvements? Thanks, Steffen
[jQuery] [autocomplete] IE7 Problems Multiple Autocomplete
Hi Guys! I am currently using the Autocomplete plugin by Jörn and its awesome! However, I have problem when I try to use multiple autocompletes in one page. There is one input. I bind it when “document.ready” fires. It’s works perfectly. function BindAutosuggestControl(id, urlAction, resultId, formatFunc, parseFunc, selectFunc) { $(# + id).autocomplete(appRoot + urlAction + '/', { dataType: 'json', minChars: 1, matchSubset: 1, autoFill: true, matchContains: 1, cacheLength: 0, selectFirst: true, formatItem: formatFunc, maxItemsToShow: 10, parse: function(data) { return parseFunc(data) } }); $(# + id).result(function(event, data, formatted) { selectFunc(event, data, formatted, resultId); }); } Then, user clicks “add another action” I cloned this “input”, set a new id (“action2”) (if user clicks again, cloned first and set to new input the new id “action3” etc) Then, I call BindAutosuggestControl(“action2”, ……) etc. It works fine in Firefox/Safari - no problems at all. User can type characters, and plugin will show him autossuggestions, user can select value etc. In Internet Explorer 7 it works only for one input box. For other boxes plugin downloaded data from server and show it to user, but user can’t select any values! It select randomly first or second values (when press “Down Arrow”). But, if we use “mouse” to select value it selects correctly I have tried everything and just can't seem to fix this issue! Can you please help ? Thanks!
[jQuery] Re: How do I get the actual HREF of a link?
On Jan 26, 2009, at 12:56 AM, jQuery Lover wrote: You can also try this: $('#testlink')[0].getAttribute('href'); Returns whatever is in your href... Actually, in IE, where I'm guessing the problem is occurring, you need to set the iFlags argument to 2 in order to get the actual value of the href attribute. From MSDN [1]: iFlags Optional. Integer that specifies one or more of the following flags: 0 Default. Performs a property search that is not case-sensitive, and returns an interpolated value if the property is found. 1 Performs a case-sensitive property search. To find a match, the uppercase and lowercase letters in sAttrName must exactly match those in the attribute name. If the iFlags parameter for getAttribute is set to 1 and this option is set to 0 (default), the specified property name might not be found. 2 Returns the value exactly as it was set in script or in the source document. [1] http://msdn.microsoft.com/en-us/library/ms536429(VS.85).aspx In this case, it would be: $('#testlink')[0].getAttribute('href', 2); One more reason to just use the jQuery method -- so we don't have to worry about such cross-browser silliness. --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Mon, Jan 26, 2009 at 7:14 AM, Jumpfroggy rocketmonk...@gmail.com wrote: Here's the short version: I have a link: a id=testlink href=page.htmlpage.html/a But when I do this: alert($('#testlink')[0].href); I get this: http://localhost/page.html How do I get the *actual* HREF of the link (page.html), and not the mangled version? Thanks! -- The long version: I have a few links in HTML: a href=/page1.html/page1.html/a a href=http://localhost/page1.html;http://localhost/page1.html/ a a href=http://localhost:80/page1.html;http://localhost:80/ page1.html/a a href=http://localhost/page2.html;http://localhost/page2.html/ a a href=http://www.google.com/page1.html;http://www.google.com/ page1.html/a When I do this: $([href]).each(function() { var matches = $([href=' + this.href + ']); console.log(Searching for HREF \ + this.href + \, text \ + $(this).html() + \ ); matches.each(function() { console.log(Found: HREF \ + this.href + \, text \ + $(this).html() + \ ); }); }); I get this: Searching for HREF http://localhost/page1.html;, text / page1.html Found: HREF http://localhost/page1.html;, text http://localhost/ page1.html Searching for HREF http://localhost/page1.html;, text http:// localhost/page1.html Found: HREF http://localhost/page1.html;, text http://localhost/ page1.html Searching for HREF http://localhost/page1.html;, text http:// localhost:80/page1.html Found: HREF http://localhost/page1.html;, text http://localhost/ page1.html Searching for HREF http://localhost/page2.html;, text http:// localhost/page2.html Found: HREF http://localhost/page2.html;, text http://localhost/ page2.html Searching for HREF http://www.google.com/page1.html;, text http://www.google.com/page1.html; Found: HREF http://www.google.com/page1.html;, text http:// www.google.com/page1.html The problem is that elem.href is returning a mangled version of the HREF, but the [href='...'] selector requires the URL exactly as it is written in the HTML. So when an element has /page.html as it's HREF, doing elem.href returns http://localhost/page.html; instead. So to search for the /page.html HREF, I have to search for: [href='page.html'] [href='/page.html'] [href='http://localhost/page.html'] [href='http://localhost:80/page.html'] [href='https://localhost/page.html'] [href='https://localhost:443/page.html'] Where localhost and 80 must be determined by javascript at runtime to reflect the current server and port. Also, the /page.html and page.html are not comprehensive. The javascript would also have to check for all permutations of ../page.html, folder/../page.html, etc. The root of the problem here is this: how can I get the *actual* HREF of a link via javascript, and not the mangled version?
[jQuery] Re: Validating reCaptcha using JQuery before sending via $.post
Here is a demo of the validation plugin with some captcha implementation, not reCaptcha: http://jquery.bassistance.de/validate/demo/captcha/ Could help as a starting point. Jörn On Mon, Jan 26, 2009 at 2:05 PM, osu onesiz...@googlemail.com wrote: Hi, Is there a way to validate a visitors reCaptcha input using JQuery before sending the form? I can't see any way I can do it. Can anytone help? Thanks
[jQuery] Re: Problem with animate callback
The click handler needs to be bound when the link actually exists. You could try it this way: function resizeSquare() { var $square = $('#square'); $square.animate({ width: 300px, marginLeft: -150px}, 800) .animate({ height: 400px, marginTop: -200px}, 800, function() { $(this).html('a href=# class=clickedclicked/a') .find('a.clicked').click(showAlert); }); } function showAlert() { alert(Display me!); return false; } --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Jan 26, 2009, at 6:52 AM, dreame4 wrote: Hi, I have function which animates div#square and insert link in this div (via animate callback): function resizeSquare() { var $square = $('#square'); $square.animate({ width: 300px, marginLeft: -150px}, 800) .animate({ height: 400px, marginTop: -200px}, 800, function() { $(this).html('a href=# class=clickedclicked/a'); }); } and then I want to display alert after click on this inserted link. This is a function doing this: function showAlert() { $('a.clicked').click(function() { alert(Display me!); return false; }); } Unfortunately it doesn't work. If I insert this link outside animate callback it's ok. Anyone can help? With regards, dreame4
[jQuery] Seeking div hide/show plugin with access by URL
I'm looking for a jQuery 1.2.6 compatible plugin providing the following: In a page with a number of sections in divs, on page load a specified div is visible but all others are hidden. Clicking a link in the sidebar navigation hides the current div and reveals in that position the div which the link references by id. Reveal/hide animation is not essential but would be preferably be a fade rather than Coda-type scrolling. It should not be possible for the user to hide all the divs. The link to the currently visible div would be highlighted, by background colour for example. Importantly, to allow external linking to sections, a specific div should be displayed when its anchor id is appended to the URL. In order for the content to be accessible and navigable without javascript I don't wish links or ids to be automatically generated. Is there anything out there that fulfills this? idTabs - http://www.sunsean.com/idTabs/ - comes close, but lacks the ability to load divs by URL string. A mod to this perhaps? Thanks for reading, Jonny
[jQuery] Suggester under browser's one
I'm building simple mechanism to show user's list of possible choices after s/he writes some letters to input box. but, browser remembers last choices (after form submit) and shows its own suggest over my suggester. Is there any way to hide/stop showing browser's original suggester?
[jQuery] Re: Suggester under browser's one
Try this, input type=text name=cc autocomplete=off / From: jquery-en@googlegroups.com on behalf of ilmarik Sent: Mon 26/01/2009 13:19 To: jQuery (English) Subject: [jQuery] Suggester under browser's one I'm building simple mechanism to show user's list of possible choices after s/he writes some letters to input box. but, browser remembers last choices (after form submit) and shows its own suggest over my suggester. Is there any way to hide/stop showing browser's original suggester? This e-mail is intended solely for the addressee and is strictly confidential; if you are not the addressee please destroy the message and all copies. Any opinion or information contained in this email or its attachments that does not relate to the business of Kainos is personal to the sender and is not given by or endorsed by Kainos. Kainos is the trading name of Kainos Software Limited, registered in Northern Ireland under company number: NI19370, having its registered offices at: Kainos House, 4-6 Upper Crescent, Belfast, BT7 1NT, Northern Ireland. Registered in the UK for VAT under number: 454598802 and registered in Ireland for VAT under number: 9950340E. This email has been scanned for all known viruses by MessageLabs but is not guaranteed to be virus free; further terms and conditions may be found on our website - www.kainos.com
[jQuery] Re: Suggester under browser's one
It works, but... https://developer.mozilla.org/en/How_to_Turn_Off_Form_Autocompletion#Original_Document_Information Thanks for help
[jQuery] Re: Hover Effect on 2 rows
This one did the trick - thanks ! On Jan 26, 5:29 am, jQuery Lover ilovejqu...@gmail.com wrote: Hi Kevin, NO, you can not wrap your tr's with div's or span's. Unfortunately Olaf's script will not work also. A little ugly script should do the job: $(function(){ $('.Row').hover(function(){ $(this).addClass('hover'); getNeighbor(this, 'Row').addClass('hover'); }, function(){ $(this).removeClass('hover'); getNeighbor(this, 'Row').removeClass('hover'); }) $('.AltRow').hover(function(){ $(this).addClass('hover'); getNeighbor(this, 'AltRow').addClass('hover'); }, function(){ $(this).removeClass('hover'); getNeighbor(this, 'AltRow').removeClass('hover'); }) }); function getNeighbor(el, cls){ if($(el).prev().hasClass(cls)) return $(el).prev(); if($(el).next().hasClass(cls)) return $(el).next(); } Read jQuery HowTo Resource - http://jquery-howto.blogspot.com On Mon, Jan 26, 2009 at 5:45 AM, kevind kevint...@gmail.com wrote: hi, i'm using JQuery to add a Class when a row is hovered over - i have it working, however, each row of data has 2 rows in the table - I want to have both rows change background color whenever i hover over either of them. The table already has 'stripes' for alternating records and readability. I'm using function: = $(function(){ $('.Row').hover(function(){ $(this).addClass('hover'); }, function(){ $(this).removeClass('hover'); }) $('.AltRow').hover(function(){ $(this).addClass('hover'); }, function(){ $(this).removeClass('hover'); }) = the table structure looks like this: table class=Grid cellspacing=0 cellpadding=0 tr class=Caption thComment/th thCreated/th /tr tr class=Row tdnbsp;/td tdnbsp;/td /tr tr class=Row tdnbsp;/td tdnbsp;/td /tr !-- -- tr class=AltRow tdnbsp;/td tdnbsp;/td /tr tr class=AltRow tdnbsp;/td tdnbsp;/td /tr /table == the individual rows highlight using STYLE of ' tr.hover td {background:yellow;} ' how do get the 2 TR's to highlight together at the same time when i float over the class 'Row' ? Do i surround them with DIVs or SPAN? Is this possible to group 2 table rows inside another element and get the function to fire for both. thanks in advance for any help
[jQuery] Re: Hover Effect on 2 rows
followup question..now that i have nice hover working, i'd like to set the TR to be a link to a page, instead of the content i have now: == tr {Issues:rowStyle} td style=TEXT-ALIGN: righta href={ID_Src}Details/a/td == I'd like to get rid of the extra column and the link and make the 2 neighboring rows the link with the browser showing a 'hand' when mouseover occurs - any suggestions? thanks again Kevin On Jan 25, 7:45 pm, kevind kevint...@gmail.com wrote: hi, i'm using JQuery to add a Class when a row is hovered over - i have it working, however, each row of data has 2 rows in the table - I want to have both rows change background color whenever i hover over either of them. The table already has 'stripes' for alternating records and readability. I'm using function: = $(function(){ $('.Row').hover(function(){ $(this).addClass('hover'); }, function(){ $(this).removeClass('hover'); }) $('.AltRow').hover(function(){ $(this).addClass('hover'); }, function(){ $(this).removeClass('hover'); }) = the table structure looks like this: table class=Grid cellspacing=0 cellpadding=0 tr class=Caption thComment/th thCreated/th /tr tr class=Row tdnbsp;/td tdnbsp;/td /tr tr class=Row tdnbsp;/td tdnbsp;/td /tr !-- -- tr class=AltRow tdnbsp;/td tdnbsp;/td /tr tr class=AltRow tdnbsp;/td tdnbsp;/td /tr /table == the individual rows highlight using STYLE of ' tr.hover td {background:yellow;} ' how do get the 2 TR's to highlight together at the same time when i float over the class 'Row' ? Do i surround them with DIVs or SPAN? Is this possible to group 2 table rows inside another element and get the function to fire for both. thanks in advance for any help
[jQuery] Working with Arrays
Hello, I use some jQUery functions, to work with Array. But now I'm missing a function. How can I remove an item from an Array? Lets say, I have this Array: var a=[ 1,2,3,4,5,6]; And now I want to remove item 3. How can I do this? Thanks for your Help, Stefan Sturm
[jQuery] Re: Validating reCaptcha using JQuery before sending via $.post
Thanks Jorn, I think one of the problems with what i'm trying to do is that recaptcha works within an iFrame and I can't figure out how to check the users input vs what is visible in the captcha image. Thanks for the link though. On Jan 26, 2:36 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: Here is a demo of the validation plugin with some captcha implementation, not reCaptcha:http://jquery.bassistance.de/validate/demo/captcha/ Could help as a starting point. Jörn On Mon, Jan 26, 2009 at 2:05 PM, osu onesiz...@googlemail.com wrote: Hi, Is there a way to validate a visitors reCaptcha input using JQuery before sending the form? I can't see any way I can do it. Can anytone help? Thanks
[jQuery] Re: how tu use jQuery.getJSON in synchronous mode
OK for success; just an transcription error; the problem is not here. On Jan 25, 9:23 pm, Ariel Flesler afles...@gmail.com wrote: It's success not succcess. -- Ariel Fleslerhttp://flesler.blogspot.com On Jan 25, 2:36 pm, Olivier lafanech...@gmail.com wrote: I try to use jQuery.ajax with dataType : 'json' : jQuery.ajax({ url : poll.json, dataType : 'json', cache : false, succcess : function(jsonObj, textStatus){ }, error : function(XMLHttpRequest, textStatus, errorThrown){ . }, async : false }); it seems not running
[jQuery] Re: jquery not working at all after upgrade to 1.3.1
Yes, and on top of that I put an alert in the jquery-1.3.1.js to see if it was finding the file correctly and it is, I got the alert before the page loaded. On Jan 23, 8:20 pm, Mike Alsup mal...@gmail.com wrote: This is the same error I get when I was building the app and the id, gid3 in this case, did not exist on the page. It does exist, but is hidden. I tried unhiding it and it didnt change anything. I can toggle between 1.2.6 and 1.3.1 and watch as it works, then doesn't work. !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; htmlheadtitle/titlescript type=text/javascript language=JavaScript function columnMove(order,scope){ var params = ; if(scope != null) { params += page_scope= + scope; } $.ajax({ type: GET, url: , data: params }); };; /script /scriptscript type=text/javascript language=JavaScript$ (document).ready(function(){$('#gid3').flexigrid();}); /script /headbody onload=DynarchMenu.setup('hmenu_01',{ context: true, electric: 500, tooltips: true });FormUtil.focusOnFirst ('ttr01_con0');DynarchMenu.setup('hmenu_02',{ electric: true });FormUtil.focusOnFirst(document) onunload=$ ('#gid3').flexDestroy(); /body/html And you're including jQuery? Are you using Firebug? Can you set a breakpoint and/or verify that the scripts have all loaded correctly?
[jQuery] Re: Working with Arrays
Hi Stefan, You could use the core JavaScript .splice() method: https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/splice --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Jan 26, 2009, at 9:20 AM, Stefan Sturm wrote: Hello, I use some jQUery functions, to work with Array. But now I'm missing a function. How can I remove an item from an Array? Lets say, I have this Array: var a=[ 1,2,3,4,5,6]; And now I want to remove item 3. How can I do this? Thanks for your Help, Stefan Sturm
[jQuery] Implementing a Knob Control
Hi, I need to implement a knob control for one of my projects (eg. a volume knob). Ideally I would like to use jquery. I have spent some time searching for any resources to get started. Not only I can't find anything in jquery, I can't find anything even resembling a knob implementation in javascript in general. I did find a few sites who sell VB or .net knob controls, but nothing in js. anyway, not sure if anyone can help, but any hints towards a resource or starting point would be much appreciated.
[jQuery] Re: Can JQuery solve the iframe height=100% problem?
My iframe is also hard-coded. But here is what I get when I do console.log statements ... $('#fileTreeIframe').load( function() { var $ifbody = $(this).contents().find ( 'body' ); console.log($ifbody); // Outputs Object length=1 0=body prevObject=Object jquery=1.2.6 $ifbody.css( 'height','auto' ); console.log($ifbody.height()); // Outputs 0 $(this).height( $ifbody.height() ); }); Obviously the troubling thing here is that height is outputting zero. Can you provide the HTML that surrounds your hard-coded iframe? There must be something else I'm not setting in the CSS or HTML. Thanks, - Dave On Jan 25, 1:53 pm, dbzz j...@briskey.net wrote: i have the iframe hardcoded in the html. if you are adding it to the dom with js, it won't get the load event binding. you might try livequery or something like it. On Jan 25, 10:21 am, laredotorn...@zipmail.com laredotorn...@zipmail.com wrote: Hi dbzz, I tried the code you provided, but went from this ... http://screencast.com/t/W8lOtgKO to the iframe disappearing entirely ... http://screencast.com/t/jCTjOLhpeX I put your code in a $(document).ready() block (below). Are there any other modifications I should make to get it to display at 100%? $(document).ready(function() { $('#fileTreeIframe').load( function() { var $ifbody = $(this).contents().find ( 'body' ); $ifbody.css( 'height','auto' ); $(this).height( $ifbody.height() ); }); }); Thanks, - Dave- Hide quoted text - - Show quoted text -
[jQuery] Re: SlideViewer
Just use the coda plugin. http://www.ndoherty.com/demos/coda-slider/1.1.1/ Coda is actually based on slideviewer if you look at the source. On Jan 26, 3:40 am, Travis rakeshkum...@gmail.com wrote: Hi, all I'm using SlideViewer plugin. is it possible to have autoplay for the gallery with play, pause , next and previous buttons. thanks in advance Rakesh
[jQuery] Re: Implementing a Knob Control
Do you mean a gague control? IE some sort of rotary control vs a slider? From: jquery-en@googlegroups.com on behalf of legofish Sent: Mon 26/01/2009 14:49 To: jQuery (English) Subject: [jQuery] Implementing a Knob Control Hi, I need to implement a knob control for one of my projects (eg. a volume knob). Ideally I would like to use jquery. I have spent some time searching for any resources to get started. Not only I can't find anything in jquery, I can't find anything even resembling a knob implementation in javascript in general. I did find a few sites who sell VB or .net knob controls, but nothing in js. anyway, not sure if anyone can help, but any hints towards a resource or starting point would be much appreciated. This e-mail is intended solely for the addressee and is strictly confidential; if you are not the addressee please destroy the message and all copies. Any opinion or information contained in this email or its attachments that does not relate to the business of Kainos is personal to the sender and is not given by or endorsed by Kainos. Kainos is the trading name of Kainos Software Limited, registered in Northern Ireland under company number: NI19370, having its registered offices at: Kainos House, 4-6 Upper Crescent, Belfast, BT7 1NT, Northern Ireland. Registered in the UK for VAT under number: 454598802 and registered in Ireland for VAT under number: 9950340E. This email has been scanned for all known viruses by MessageLabs but is not guaranteed to be virus free; further terms and conditions may be found on our website - www.kainos.com
[jQuery] Re: Hover Effect on 2 rows
That's quite simple. Just adjust your CSS so that the rows 'blend together', set cursor: pointer in your CSS, and use this: $('.Row:even').each(function(){ var t = $(this), link = t.find('a')[0].href; t.add( t.next('.Row') ).click(function(){ window.location = link; }); }); use :odd and prev() if you're link is always on the second row. On Jan 26, 12:19 pm, kevind kevint...@gmail.com wrote: followup question..now that i have nice hover working, i'd like to set the TR to be a link to a page, instead of the content i have now: == tr {Issues:rowStyle} td style=TEXT-ALIGN: righta href={ID_Src}Details/a/td == I'd like to get rid of the extra column and the link and make the 2 neighboring rows the link with the browser showing a 'hand' when mouseover occurs - any suggestions? thanks again Kevin On Jan 25, 7:45 pm, kevind kevint...@gmail.com wrote: hi, i'm using JQuery to add a Class when a row is hovered over - i have it working, however, each row of data has 2 rows in the table - I want to have both rows change background color whenever i hover over either of them. The table already has 'stripes' for alternating records and readability. I'm using function: = $(function(){ $('.Row').hover(function(){ $(this).addClass('hover'); }, function(){ $(this).removeClass('hover'); }) $('.AltRow').hover(function(){ $(this).addClass('hover'); }, function(){ $(this).removeClass('hover'); }) = the table structure looks like this: table class=Grid cellspacing=0 cellpadding=0 tr class=Caption thComment/th thCreated/th /tr tr class=Row tdnbsp;/td tdnbsp;/td /tr tr class=Row tdnbsp;/td tdnbsp;/td /tr !-- -- tr class=AltRow tdnbsp;/td tdnbsp;/td /tr tr class=AltRow tdnbsp;/td tdnbsp;/td /tr /table == the individual rows highlight using STYLE of ' tr.hover td {background:yellow;} ' how do get the 2 TR's to highlight together at the same time when i float over the class 'Row' ? Do i surround them with DIVs or SPAN? Is this possible to group 2 table rows inside another element and get the function to fire for both. thanks in advance for any help
[jQuery] Re: Seeking div hide/show plugin with access by URL
Try http://stilbuero.de/jquery/tabs/ or the Tabs funcionality in jQuery UI. Or venture into the docs/jQuery API (http://docs.jquery.com, http://api.jquery.com) and you should be able to accomplish all this by yourself in a few days. - ricardo On Jan 26, 11:08 am, Jonny Stephens goo...@bloog.co.uk wrote: I'm looking for a jQuery 1.2.6 compatible plugin providing the following: In a page with a number of sections in divs, on page load a specified div is visible but all others are hidden. Clicking a link in the sidebar navigation hides the current div and reveals in that position the div which the link references by id. Reveal/hide animation is not essential but would be preferably be a fade rather than Coda-type scrolling. It should not be possible for the user to hide all the divs. The link to the currently visible div would be highlighted, by background colour for example. Importantly, to allow external linking to sections, a specific div should be displayed when its anchor id is appended to the URL. In order for the content to be accessible and navigable without javascript I don't wish links or ids to be automatically generated. Is there anything out there that fulfills this? idTabs -http://www.sunsean.com/idTabs/- comes close, but lacks the ability to load divs by URL string. A mod to this perhaps? Thanks for reading, Jonny
[jQuery] Re: Form Validation
I just tested this code on IE 6/7 and it does not work. I am using a thickbox ajax call to load this form into a lightbox. The forms loads just fine. If you don't fill anything out and submit the form, it will let it go through. It also seems to refresh the entire page which it shouldn't. Everything works fine on FF and Safari. Here is the code that is on the form page. Any idea why this might be happening? $(document).ready(function() { $(#post_form).validate({ rules: { email: { required: true, email: true }, friends_email: { required: true, email: true } }, submitHandler: function(form) { var data = {} data.name = $(form).find('inp...@name=name]').val(); data.email = $(form).find('inp...@name=email]').val(); data.comments = $(form).find('inp...@name=comments]').val(); data.friends_name = $(form).find('inp...@name=friends_name]').val (); data.friends_email = $(form).find('textarea [...@name=friends_email]').val(); $.post(/user/emailfriend/{{ mls_listing_id }}/, data, function(responseData) { $(#fade).fadeOut(slow); $(#done).html('p class=boldThank you for your interest. Your friend will receive the e-mail shortly./p'); }, json ); } }); }); On Jan 25, 2:47 pm, issya floridali...@gmail.com wrote: Thank you, that worked like a charm. On Jan 25, 2:22 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: Try to move the code in your own submit handler to the submitHandler-callback: $(document).ready(function() { $.validator.addMethod(phone, function(ph, element) { if (ph == null) { return false; } var stripped = ph.replace(/[\s()+-]|ext\.?/gi, ); // 10 is the minimum number of numbers required return ((/\d{10,}/i).test(stripped)); }, Please enter a valid phone number); $(#post_form).validate({ rules: { phone: { required: true, phone: true } }, submitHandler: function(form) { var data = {} data.name = $(form).find('inp...@name=name]').val(); data.email = $(form).find('inp...@name=email]').val(); data.phone = $(form).find('inp...@name=phone]').val(); data.comments = $(form).find('inp...@name=comments]').val(); // suppose our django app called 'testapp' $.post(/user/scheduleshowing/T33432123/, data, function(responseData) { $(#fade).fadeOut(slow); $(#done).html('p class=boldThank you for your interest. An associate will contact you shortly./p'); }, json ); } }); }); Jörn On Sun, Jan 25, 2009 at 6:46 PM,issyafloridali...@gmail.com wrote: Hello, I am using a few plugins together for AJAX forms and validation. I have validation on the name and phone fields. If you add a class of required to the fields, the validation plugin will automatically validate them. If you want to do more advanced validation you have to tell it so. I have the below code and if I don't if I fill out the form but put non integer values in the phone number field it will tell me to put a valid number. But if I click on submit a second time it will let the form post. Even though I did not fill in a valid phone number. What am I doing wrong? $(document).ready(function() { $.validator.addMethod(phone, function(ph, element) { if (ph == null) { return false; } var stripped = ph.replace(/[\s()+-]|ext\.?/gi, ); // 10 is the minimum number of numbers required return ((/\d{10,}/i).test(stripped)); }, Please enter a valid phone number); $(#post_form).validate({ rules: { phone: { required: true, phone: true } } }); $('#post_form').submit(function(event){ event.preventDefault(); // cancel the default action var form = this; var data = {} data.name = $(form).find('inp...@name=name]').val(); data.email = $(form).find('inp...@name=email]').val(); data.phone = $(form).find('inp...@name=phone]').val(); data.comments =
[jQuery] Re: Implementing a Knob Control
Legofish, I've got a couple ideas which might get the job done, but they all depend on what style of knob you want. Take a look around a google image search, and see if you can find a good representation of the type of knob you want. Then we can go from there. :) On Jan 26, 10:03 am, James Hughes j.hug...@kainos.com wrote: Do you mean a gague control? IE some sort of rotary control vs a slider? From: jquery-en@googlegroups.com on behalf of legofish Sent: Mon 26/01/2009 14:49 To: jQuery (English) Subject: [jQuery] Implementing a Knob Control Hi, I need to implement a knob control for one of my projects (eg. a volume knob). Ideally I would like to use jquery. I have spent some time searching for any resources to get started. Not only I can't find anything in jquery, I can't find anything even resembling a knob implementation in javascript in general. I did find a few sites who sell VB or .net knob controls, but nothing in js. anyway, not sure if anyone can help, but any hints towards a resource or starting point would be much appreciated. This e-mail is intended solely for the addressee and is strictly confidential; if you are not the addressee please destroy the message and all copies. Any opinion or information contained in this email or its attachments that does not relate to the business of Kainos is personal to the sender and is not given by or endorsed by Kainos. Kainos is the trading name of Kainos Software Limited, registered in Northern Ireland under company number: NI19370, having its registered offices at: Kainos House, 4-6 Upper Crescent, Belfast, BT7 1NT, Northern Ireland. Registered in the UK for VAT under number: 454598802 and registered in Ireland for VAT under number: 9950340E. This email has been scanned for all known viruses by MessageLabs but is not guaranteed to be virus free; further terms and conditions may be found on our website -www.kainos.com
[jQuery] this (class) + id + text
Hey, sorry for the weird topic but i couldn't find a better one so i choose this! ;) Right now, i got this code: $('.show_image').hover( function(){ $('.image').show(); }, function(){ $('.image').hide(); } ); The href looks like this: a href=# class='show_image' id=image_1Show Image 1/a ... So, if i mouseover one of my 10 show_image classes, all image are shown. What i want is, that only the image with the select ID is shown. I thought, that i could do something like this: $(this).ID of this.some text to reach the image.show() I hope you understand what i mean. Thanks for your help Flo
[jQuery] Re: Suggester under browser's one
That, or you could just use a rotating name for the field. I'm pretty sure that would fix the problem as well, as I think form memory is based off input name/id? I could be way off the mark, but naming the field like: 'salt_' + new Date().valueOf(); should stop autocomplete from working on it. On Jan 26, 9:07 am, ilmarik grzegorzkara...@gmail.com wrote: It works, but... https://developer.mozilla.org/en/How_to_Turn_Off_Form_Autocompletion#... Thanks for help
[jQuery] Re: this (class) + id + text
Lets assume you have the following html: a href=#image_1 class=show_imageShow Image/a a href=#otherImg class=show_imageShow Image/a a href=#image_2 class=show_imageShow Image/a img src=a.png id=image_1 alt=Some Image/ img src=b.png id=otherImg alt=Some Image/ img src=c.png id=image_2 alt=Some Image/ Then the code you want is: $('.show_img').hover( function(){ $(this.href).show() }, function(){ $(this.href).hide() } ); this.href contains the jQuery selector you want to make visible, and corresponds with the id attribute of the images. On Jan 26, 10:23 am, Crazy-Achmet crazyach...@gmail.com wrote: Hey, sorry for the weird topic but i couldn't find a better one so i choose this! ;) Right now, i got this code: $('.show_image').hover( function(){ $('.image').show(); }, function(){ $('.image').hide(); } ); The href looks like this: a href=# class='show_image' id=image_1Show Image 1/a ... So, if i mouseover one of my 10 show_image classes, all image are shown. What i want is, that only the image with the select ID is shown. I thought, that i could do something like this: $(this).ID of this.some text to reach the image.show() I hope you understand what i mean. Thanks for your help Flo
[jQuery] Re: How do I get the actual HREF of a link?
I've used this a hundred times: $('#testlink').attr('href'); Don't make jQuery more complicated than it has to be. -- Sean On Jan 26, 7:32 am, Karl Swedberg k...@englishrules.com wrote: On Jan 26, 2009, at 12:56 AM, jQuery Lover wrote: You can also try this: $('#testlink')[0].getAttribute('href'); Returns whatever is in your href... Actually, in IE, where I'm guessing the problem is occurring, you need to set the iFlags argument to 2 in order to get the actual value of the href attribute. From MSDN [1]: iFlags Optional. Integer that specifies one or more of the following flags: 0 Default. Performs a property search that is not case-sensitive, and returns an interpolated value if the property is found. 1 Performs a case-sensitive property search. To find a match, the uppercase and lowercase letters in sAttrName must exactly match those in the attribute name. If the iFlags parameter for getAttribute is set to 1 and this option is set to 0 (default), the specified property name might not be found. 2 Returns the value exactly as it was set in script or in the source document. [1]http://msdn.microsoft.com/en-us/library/ms536429(VS.85).aspx In this case, it would be: $('#testlink')[0].getAttribute('href', 2); One more reason to just use the jQuery method -- so we don't have to worry about such cross-browser silliness. --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On Mon, Jan 26, 2009 at 7:14 AM, Jumpfroggy rocketmonk...@gmail.com wrote: Here's the short version: I have a link: a id=testlink href=page.htmlpage.html/a But when I do this: alert($('#testlink')[0].href); I get this: http://localhost/page.html How do I get the *actual* HREF of the link (page.html), and not the mangled version? Thanks! -- The long version: I have a few links in HTML: a href=/page1.html/page1.html/a a href=http://localhost/page1.html;http://localhost/page1.html/ a a href=http://localhost:80/page1.html;http://localhost:80/ page1.html/a a href=http://localhost/page2.html;http://localhost/page2.html/ a a href=http://www.google.com/page1.html;http://www.google.com/ page1.html/a When I do this: $([href]).each(function() { var matches = $([href=' + this.href + ']); console.log(Searching for HREF \ + this.href + \, text \ + $(this).html() + \ ); matches.each(function() { console.log(Found: HREF \ + this.href + \, text \ + $(this).html() + \ ); }); }); I get this: Searching for HREF http://localhost/page1.html;, text / page1.html Found: HREF http://localhost/page1.html;, text http://localhost/ page1.html Searching for HREF http://localhost/page1.html;, text http:// localhost/page1.html Found: HREF http://localhost/page1.html;, text http://localhost/ page1.html Searching for HREF http://localhost/page1.html;, text http:// localhost:80/page1.html Found: HREF http://localhost/page1.html;, text http://localhost/ page1.html Searching for HREF http://localhost/page2.html;, text http:// localhost/page2.html Found: HREF http://localhost/page2.html;, text http://localhost/ page2.html Searching for HREF http://www.google.com/page1.html;, text http://www.google.com/page1.html; Found: HREF http://www.google.com/page1.html;, text http:// www.google.com/page1.html The problem is that elem.href is returning a mangled version of the HREF, but the [href='...'] selector requires the URL exactly as it is written in the HTML. So when an element has /page.html as it's HREF, doing elem.href returns http://localhost/page.html; instead. So to search for the /page.html HREF, I have to search for: [href='page.html'] [href='/page.html'] [href='http://localhost/page.html'] [href='http://localhost:80/page.html'] [href='https://localhost/page.html'] [href='https://localhost:443/page.html'] Where localhost and 80 must be determined by javascript at runtime to reflect the current server and port. Also, the /page.html and page.html are not comprehensive. The javascript would also have to check for all permutations of ../page.html, folder/../page.html, etc. The root of the problem here is this: how can I get the *actual* HREF of a link via javascript, and not the mangled version?
[jQuery] cluetip with an dynamic aspx content
hi! i have a problem with ajax-loaded contents with the cluetip-plugin... the loading of a .html-file works, but i want to load a .aspx-file – and this is my problem. there is always the message sorry, the contents could not be loaded. anybody knows this problem?
[jQuery] Re: this (class) + id + text
Ugh, sorry. Mondays. ;_; The correct code should be: $('.show_img').hover( function(){ $($(this).attr('href')).show() }, function(){ $($(this).attr('href')).hide() } ); On Jan 26, 10:33 am, Eric Garside gars...@gmail.com wrote: Lets assume you have the following html: a href=#image_1 class=show_imageShow Image/a a href=#otherImg class=show_imageShow Image/a a href=#image_2 class=show_imageShow Image/a img src=a.png id=image_1 alt=Some Image/ img src=b.png id=otherImg alt=Some Image/ img src=c.png id=image_2 alt=Some Image/ Then the code you want is: $('.show_img').hover( function(){ $(this.href).show() }, function(){ $(this.href).hide() } ); this.href contains the jQuery selector you want to make visible, and corresponds with the id attribute of the images. On Jan 26, 10:23 am, Crazy-Achmet crazyach...@gmail.com wrote: Hey, sorry for the weird topic but i couldn't find a better one so i choose this! ;) Right now, i got this code: $('.show_image').hover( function(){ $('.image').show(); }, function(){ $('.image').hide(); } ); The href looks like this: a href=# class='show_image' id=image_1Show Image 1/a ... So, if i mouseover one of my 10 show_image classes, all image are shown. What i want is, that only the image with the select ID is shown. I thought, that i could do something like this: $(this).ID of this.some text to reach the image.show() I hope you understand what i mean. Thanks for your help Flo
[jQuery] Re: this (class) + id + text
Amazing, worked like a charme! ;) Thanks On 26 Jan., 16:42, Eric Garside gars...@gmail.com wrote: Ugh, sorry. Mondays. ;_; The correct code should be: $('.show_img').hover( function(){ $($(this).attr('href')).show() }, function(){ $($(this).attr('href')).hide() } ); On Jan 26, 10:33 am, Eric Garside gars...@gmail.com wrote: Lets assume you have the following html: a href=#image_1 class=show_imageShow Image/a a href=#otherImg class=show_imageShow Image/a a href=#image_2 class=show_imageShow Image/a img src=a.png id=image_1 alt=Some Image/ img src=b.png id=otherImg alt=Some Image/ img src=c.png id=image_2 alt=Some Image/ Then the code you want is: $('.show_img').hover( function(){ $(this.href).show() }, function(){ $(this.href).hide() } ); this.href contains the jQuery selector you want to make visible, and corresponds with the id attribute of the images. On Jan 26, 10:23 am, Crazy-Achmet crazyach...@gmail.com wrote: Hey, sorry for the weird topic but i couldn't find a better one so i choose this! ;) Right now, i got this code: $('.show_image').hover( function(){ $('.image').show(); }, function(){ $('.image').hide(); } ); The href looks like this: a href=# class='show_image' id=image_1Show Image 1/a ... So, if i mouseover one of my 10 show_image classes, all image are shown. What i want is, that only the image with the select ID is shown. I thought, that i could do something like this: $(this).ID of this.some text to reach the image.show() I hope you understand what i mean. Thanks for your help Flo
[jQuery] Re: cluetip with an dynamic aspx content
Hi there, That message occurs when there is an ajax error. Can you use Firebug to see what error is being returned? --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Jan 26, 2009, at 10:08 AM, chrs wrote: hi! i have a problem with ajax-loaded contents with the cluetip-plugin... the loading of a .html-file works, but i want to load a .aspx-file – and this is my problem. there is always the message sorry, the contents could not be loaded. anybody knows this problem?
[jQuery] Re: How do I get the actual HREF of a link?
My point exactly. --Karl On Jan 26, 2009, at 10:10 AM, seangates wrote: I've used this a hundred times: $('#testlink').attr('href'); Don't make jQuery more complicated than it has to be. -- Sean On Jan 26, 7:32 am, Karl Swedberg k...@englishrules.com wrote: On Jan 26, 2009, at 12:56 AM, jQuery Lover wrote: You can also try this: $('#testlink')[0].getAttribute('href'); Returns whatever is in your href... Actually, in IE, where I'm guessing the problem is occurring, you need to set the iFlags argument to 2 in order to get the actual value of the href attribute. From MSDN [1]: iFlags Optional. Integer that specifies one or more of the following flags: 0 Default. Performs a property search that is not case-sensitive, and returns an interpolated value if the property is found. 1 Performs a case-sensitive property search. To find a match, the uppercase and lowercase letters in sAttrName must exactly match those in the attribute name. If the iFlags parameter for getAttribute is set to 1 and this option is set to 0 (default), the specified property name might not be found. 2 Returns the value exactly as it was set in script or in the source document. [1]http://msdn.microsoft.com/en-us/library/ms536429(VS.85).aspx In this case, it would be: $('#testlink')[0].getAttribute('href', 2); One more reason to just use the jQuery method -- so we don't have to worry about such cross-browser silliness. --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On Mon, Jan 26, 2009 at 7:14 AM, Jumpfroggy rocketmonk...@gmail.com wrote: Here's the short version: I have a link: a id=testlink href=page.htmlpage.html/a But when I do this: alert($('#testlink')[0].href); I get this: http://localhost/page.html How do I get the *actual* HREF of the link (page.html), and not the mangled version? Thanks! -- The long version: I have a few links in HTML: a href=/page1.html/page1.html/a a href=http://localhost/page1.html;http://localhost/ page1.html/ a a href=http://localhost:80/page1.html;http://localhost:80/ page1.html/a a href=http://localhost/page2.html;http://localhost/ page2.html/ a a href=http://www.google.com/page1.html;http://www.google.com/ page1.html/a When I do this: $([href]).each(function() { var matches = $([href=' + this.href + ']); console.log(Searching for HREF \ + this.href + \, text \ + $(this).html() + \ ); matches.each(function() { console.log(Found: HREF \ + this.href + \, text \ + $(this).html() + \ ); }); }); I get this: Searching for HREF http://localhost/page1.html;, text / page1.html Found: HREF http://localhost/page1.html;, text http:// localhost/ page1.html Searching for HREF http://localhost/page1.html;, text http:// localhost/page1.html Found: HREF http://localhost/page1.html;, text http:// localhost/ page1.html Searching for HREF http://localhost/page1.html;, text http:// localhost:80/page1.html Found: HREF http://localhost/page1.html;, text http:// localhost/ page1.html Searching for HREF http://localhost/page2.html;, text http:// localhost/page2.html Found: HREF http://localhost/page2.html;, text http:// localhost/ page2.html Searching for HREF http://www.google.com/page1.html;, text http://www.google.com/page1.html; Found: HREF http://www.google.com/page1.html;, text http:// www.google.com/page1.html The problem is that elem.href is returning a mangled version of the HREF, but the [href='...'] selector requires the URL exactly as it is written in the HTML. So when an element has /page.html as it's HREF, doing elem.href returns http://localhost/page.html; instead. So to search for the /page.html HREF, I have to search for: [href='page.html'] [href='/page.html'] [href='http://localhost/page.html'] [href='http://localhost:80/page.html'] [href='https://localhost/page.html'] [href='https://localhost:443/page.html'] Where localhost and 80 must be determined by javascript at runtime to reflect the current server and port. Also, the /page.html and page.html are not comprehensive. The javascript would also have to check for all permutations of ../page.html, folder/../ page.html, etc. The root of the problem here is this: how can I get the *actual* HREF of a link via javascript, and not the mangled version?
[jQuery] Re: Problem with Jcarousel and Safari: next button disabled
I ran into a similar problem with jcarousel and Safari. I was creating new carousels after the page had initialized, and the default prev/ next buttons were always disabled. I tracked it down to a browser snoop at line 186: if ($.browser.safari) { this.buttons(false, false); $(window).bind('load', function() { self.setup(); }); } else this.setup(); I just replaced this section with: this.setup(); In my case, since window has already loaded, the carousel was not completing its setup stage. Disabling this browser hack had no other effect, perhaps it was put in to avoid an issue that doesn't appear in newer versions of Safari. I can't guarantee this will fix your issue, but it's probably worth a shot. Charlie On Jan 25, 3:33 pm, kinesias talk2matth...@googlemail.com wrote: Hi, please check outhttp://www.mirox-media.com/blog_add/media/data/film_festivals.html When loading it the first time into safari, the next button and the dot array at the top are disabled. It works only if you click on the refresh button in safari a couple of times. Can anyone help?? thank you very much, Matthias
[jQuery] Re: How to get the value of List and concatenate with JQUERY
As long as, I am understanding what you are trying to do...this should work. $(document).ready(function(){ var values = new Array(); $(ul#developerul li).addClass(getValues); for (x=0;x=3;x++){ values[x] = $(ul#developerul li).eq(x).attr(value); } $(ul#developerul).click(function(){ alert (values); }); }); Outputs 1,2,3. Hope that helps, Manowar721 On Jan 22, 3:38 pm, nk neetuk...@gmail.com wrote: Hi All, I have a list which is being populated dynamically from the database.I am trying to capture the value of the list items (using click function) and pass it to a query to get the result set.The value attribute has been deprecated for LI.Please tell me a way to capture the LI value. ul id=developerul li value='1'One/li li value='2'Two/li li value='3'three/li /ul For the above I have tried $(#developerul.children()) and also $(this).children() But does not work. - And also how can we concatenate a ID value ID=thelistItems the result should be thelistItems_11130. $(#thelistItems+ _ + 11130).append(txt); Thanks
[jQuery] Re: Recursion issue with nested lists.
Thanks Rob Karl. Karl, excellent plugin! I think this is exactly what I need to get around the default text() function. Thanks a million! Nick On Jan 24, 5:35 am, Karl Swedberg k...@englishrules.com wrote: Oh, rats. Sorry about that, Rob. On both counts. Yeah, meant to reply to the OP. And I inadvertently posted links to my local virtual host. Not the first time I've made that boneheaded mistake. Here are the real links: http://plugins.learningjquery.com/textchildren/ http://plugins.learningjquery.com/textchildren/#demo --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On Jan 24, 2009, at 1:00 AM, RobG wrote: On Jan 24, 2:21 pm, Karl Swedberg k...@englishrules.com wrote: [...] I wrote a plugin for this sort of thing: http://plugins.kswedberg/textchildren/ interactive demo: http://plugins.kswedberg/textchildren/#demo I think you meant to reply to the OP, or maybe GG is messing up the thread. For both those links I get: can’t find the server 'plugins.kswedberg' -- Rob
[jQuery] Re: Hover Effect on 2 rows
thanks - i've opted to roll things up to 1 row anyway - however, i'll keep the link for these 2 row scripts as they seem to work. On Jan 26, 10:04 am, Ricardo Tomasi ricardob...@gmail.com wrote: That's quite simple. Just adjust your CSS so that the rows 'blend together', set cursor: pointer in your CSS, and use this: $('.Row:even').each(function(){ var t = $(this), link = t.find('a')[0].href; t.add( t.next('.Row') ).click(function(){ window.location = link; }); }); use :odd and prev() if you're link is always on the second row. On Jan 26, 12:19 pm, kevind kevint...@gmail.com wrote: followup question..now that i have nice hover working, i'd like to set the TR to be a link to a page, instead of the content i have now: == tr {Issues:rowStyle} td style=TEXT-ALIGN: righta href={ID_Src}Details/a/td == I'd like to get rid of the extra column and the link and make the 2 neighboring rows the link with the browser showing a 'hand' when mouseover occurs - any suggestions? thanks again Kevin On Jan 25, 7:45 pm, kevind kevint...@gmail.com wrote: hi, i'm using JQuery to add a Class when a row is hovered over - i have it working, however, each row of data has 2 rows in the table - I want to have both rows change background color whenever i hover over either of them. The table already has 'stripes' for alternating records and readability. I'm using function: = $(function(){ $('.Row').hover(function(){ $(this).addClass('hover'); }, function(){ $(this).removeClass('hover'); }) $('.AltRow').hover(function(){ $(this).addClass('hover'); }, function(){ $(this).removeClass('hover'); }) = the table structure looks like this: table class=Grid cellspacing=0 cellpadding=0 tr class=Caption thComment/th thCreated/th /tr tr class=Row tdnbsp;/td tdnbsp;/td /tr tr class=Row tdnbsp;/td tdnbsp;/td /tr !-- -- tr class=AltRow tdnbsp;/td tdnbsp;/td /tr tr class=AltRow tdnbsp;/td tdnbsp;/td /tr /table == the individual rows highlight using STYLE of ' tr.hover td {background:yellow;} ' how do get the 2 TR's to highlight together at the same time when i float over the class 'Row' ? Do i surround them with DIVs or SPAN? Is this possible to group 2 table rows inside another element and get the function to fire for both. thanks in advance for any help
[jQuery] Re: Hover Effect on 2 rows
Update on this project i've opted to roll up to 1 row as end users of this private app. have more screen space horizontally that i can work with. however, the script below doesn't appear to work in Firefox - it works fine in IE 6, Chrome what's up with that ? my on-page style is tr.hover td{ background-color: LemonChiffon; } any help appreciated I'm using function: = $(function(){ $('.Row').hover(function(){ $(this).addClass('hover'); }, function(){ $(this).removeClass('hover'); }) $('.AltRow').hover(function(){ $(this).addClass('hover'); }, function(){ $(this).removeClass('hover'); }) =
[jQuery] Re: How to get the value of List and concatenate with JQUERY
If I understand correctly, given the list you've shown, you want an alert of the value of the li you just clicked, yes? If so: $(function(){ $('#developerul li').click(function(){ var value = $(this).attr('value'); alert(value); // Or do whatever you wanted to do with javascript here, using the value }); }); As for appendations: I'm not sure which value is static (I assume that would be the 'thelistItems' part. If so: $('#thelistItems_' + someOtherValue).append(txt); On Jan 26, 10:59 am, Manowar721 manowar...@gmail.com wrote: As long as, I am understanding what you are trying to do...this should work. $(document).ready(function(){ var values = new Array(); $(ul#developerul li).addClass(getValues); for (x=0;x=3;x++){ values[x] = $(ul#developerul li).eq(x).attr(value); } $(ul#developerul).click(function(){ alert (values); }); }); Outputs 1,2,3. Hope that helps, Manowar721 On Jan 22, 3:38 pm, nk neetuk...@gmail.com wrote: Hi All, I have a list which is being populated dynamically from the database.I am trying to capture the value of the list items (using click function) and pass it to a query to get the result set.The value attribute has been deprecated for LI.Please tell me a way to capture the LI value. ul id=developerul li value='1'One/li li value='2'Two/li li value='3'three/li /ul For the above I have tried $(#developerul.children()) and also $(this).children() But does not work. - And also how can we concatenate a ID value ID=thelistItems the result should be thelistItems_11130. $(#thelistItems+ _ + 11130).append(txt); Thanks
[jQuery] Re: How to get the value of List and concatenate with JQUERY
This line above $(ul#developerul li).addClass(getValues); does nothing. It was part of another way I was going to suggest, then forgot to erase it. Sorry for the confusion. ,Manowar721 On Jan 26, 8:59 am, Manowar721 manowar...@gmail.com wrote: As long as, I am understanding what you are trying to do...this should work. $(document).ready(function(){ var values = new Array(); $(ul#developerul li).addClass(getValues); for (x=0;x=3;x++){ values[x] = $(ul#developerul li).eq(x).attr(value); } $(ul#developerul).click(function(){ alert (values); }); }); Outputs 1,2,3. Hope that helps, Manowar721 On Jan 22, 3:38 pm, nk neetuk...@gmail.com wrote: Hi All, I have a list which is being populated dynamically from the database.I am trying to capture the value of the list items (using click function) and pass it to a query to get the result set.The value attribute has been deprecated for LI.Please tell me a way to capture the LI value. ul id=developerul li value='1'One/li li value='2'Two/li li value='3'three/li /ul For the above I have tried $(#developerul.children()) and also $(this).children() But does not work. - And also how can we concatenate a ID value ID=thelistItems the result should be thelistItems_11130. $(#thelistItems+ _ + 11130).append(txt); Thanks- Hide quoted text - - Show quoted text -
[jQuery] Re: showing animated gif when redirecting to new a page
bump On Jan 22, 1:07 am, misskittyt misskit...@gmail.com wrote: Hi all, I'm having trouble showing an animated gif (to indicate that the page is loading) when redirecting to a new page. There are several tabs a user can choose, each taking them to a different page in the site. I think this almost works, but I don't like how the screen goes entirely blank. I've tried using fadeTo but the gif will show up as being unanimated. The same seems to be true if I don't use use the fadeOut and only use the fadeIn. How can I just show the animated gif as a user is redirected to the new page? Thank you! M- $(document).ready(function() { $(.tab).click(function() { $(body).fadeOut(fast); $(body).fadeIn(slow).append(div class=\progress\br /img src=\Images/bigsnake.gif\ alt=\\/Processing...please wait.br /br //div); }); });- Hide quoted text - - Show quoted text -
[jQuery] Re: Which Jquery Plugin can do that
Thank you. I found this, and that might help http://www.ryancramer.com/projects/asmselect/examples/example2.html -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of jQuery Lover Sent: Monday, January 26, 2009 2:53 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Which Jquery Plugin can do that I don't know about if there is a plugin that does exactly the same thing, but if you're familiar with jquery this can be a good starting point: http://www.google.com/search?q=jquery+tree Choose a plugin and try to bind extra click events that would do what you need. Read jQuery HowTo Resource - http://jquery-howto.blogspot.com On Mon, Jan 26, 2009 at 9:59 AM, lionel28 lmarte...@haitiwebs.net wrote: http://sitebuilder.websitewelcome.com/Wizard/Pages http://sitebuilder.websitewelcome.com/Wizard/Pages Hello everyone, Please go to that link and click on Pages They are using prototype on that site, but I rather use Jquery. When you check a page checkbox, you are able to send it to the right, to the left, move it up and down. Can someone point me to a Jquery plugin that can do that? Thank you -- View this message in context: http://www.nabble.com/Which-Jquery-Plugin-can-do-that-tp21660540s27240p21660 540.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: showing animated gif when redirecting to new a page
You could set an amimated GIF as a background image for the page. Then, as page content loads in, it'll overlap the animation and you wouldn't see it any more. -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of misskittyt Sent: Monday, January 26, 2009 10:41 AM To: jQuery (English) Subject: [jQuery] Re: showing animated gif when redirecting to new a page bump On Jan 22, 1:07 am, misskittyt misskit...@gmail.com wrote: Hi all, I'm having trouble showing an animated gif (to indicate that the page is loading) when redirecting to a new page. There are several tabs a user can choose, each taking them to a different page in the site. I think this almost works, but I don't like how the screen goes entirely blank. I've tried using fadeTo but the gif will show up as being unanimated. The same seems to be true if I don't use use the fadeOut and only use the fadeIn. How can I just show the animated gif as a user is redirected to the new page? Thank you! M- $(document).ready(function() { $(.tab).click(function() { $(body).fadeOut(fast); $(body).fadeIn(slow).append(div class=\progress\br /img src=\Images/bigsnake.gif\ alt=\\/Processing...please wait.br /br //div); }); });- Hide quoted text - - Show quoted text-
[jQuery] Re: Closing the modal pop up programmatically
$.modal.close(); will do the trick ;) On Jan 25, 8:39 pm, TFrank tcw...@gmail.com wrote: Hi all. I see the obvious simplemodal-close class, which by default will close the modal object. However, the problem I am having is that the modal div's html is being populated by an ajax call for a remote page. The response'd HTML contains the simplemodal-close class, however its not being parsed because it is being loaded after the modal object's creation. So to recap: simplemodal-close works fine for items parsed at creation, however when loading html from a remote source using an ajax call; it fails because it doesn't parse the response'd html. Any ideas on how to attach the event OR to call the close method directly? I have tried things like $('#modalDiv').modal().close() however to no avail. Thanks in advance... Tim
[jQuery] Re: Text Manipulation
This works great! Thanks a lot for the help Jay! On Jan 23, 7:08 pm, jay jay.ab...@gmail.com wrote: Something like this should work: str = $(textinput).val(); $(textinput).val( str.substr(0,str.indexOf(@)) ); On Jan 23, 7:51 pm, whtthehecker hecker.r...@gmail.com wrote: Hi, I'm trying to create a sign up form where after the user inputs their email address when they click or tab down to the next field (username field) it auto-populates it with their email address but with the @x.xxx section stripped from it. i.e. if the user puts j...@johndoe.com into the email field when they tab to the username field it will auto-populate with john. I have achieved auto-populating the field with the email address but I'm not sure how to remove the @johndoe.com part. Thanks for any help you can provide!
[jQuery] Continuing to Seek Rounded Corners on Absolutely Positioned Elements that Work in IE7
The latest approach I'm trying uses a more old-school technique, described here: http://www.schillmania.com/content/projects/even-more-rounded-corners/ For most uses, it works very well. But for absolutely positioned objects, one of the divs seems to disappear in IE7. Here's a demo using it with an absolutely positioned object: http://www.flavorzoom.com/schillmania_tryout/temp.html It looks great in Firefox, but not in IE7. Is there a way to tweak the CSS to get this to work in IE7? Thanks in advance to all for any thoughts!
[jQuery] .val() problem
Hi, I have a set of radio buttons with name=field_submcategory[value] I want to figure out what value has been selected, even after the user hits refresh (so .change won't work). I've tried this but the alert I get is always undefined, independently from what button is checked: alert($('input:radio[name=field_submcategory[value]]:checked').val()); Thanks!
[jQuery] Re: jquery not working at all after upgrade to 1.3.1
Yes, and on top of that I put an alert in the jquery-1.3.1.js to see if it was finding the file correctly and it is, I got the alert before the page loaded. On Jan 23, 8:20 pm, Mike Alsup mal...@gmail.com wrote: How about creating a small test page and posting a link to it?
[jQuery] Re: cluetip with an dynamic aspx content
hi karl, it is a parse error. the class, where the site is deduced, can't be loaded. (or something like this...) --- christian
[jQuery] Re: tooltip - image preview does not respect window border
Thanks, I replaced jquery.tooltip.js and jquery.tooltip.css with the new versions and the tooltips stopped working alltogether. In my wordpress theme folder I have a jquery directory. In this directory I have the following files: global.js jquery.js jquery.tabs.css jquery.tabs.pack.js jquery.tabs-ie.css jquery.tooltip.css jquery.tooltip.js jquery-1.1.3.1.pack.js I tried several ways to upgrade the tooltip but with no luck. Thanks, Nagita On Jan 25, 5:23 am, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: It looks like you got an old version of the plugin. Try the latest release, it has built-in support for repositioning the tooltip at the viewport border:http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/ Jörn On Sat, Jan 24, 2009 at 11:26 PM, CNN_news nagit...@gmail.com wrote: Hello, I have a theme that shows a preview of the image that the mouse is currently hovering over with a larger image using jquery tooltip. The problem is that it always places the preview on the right and if the image is on the right side of the page the preview causes horizontal scrolling, see for yourself: http://torontopersonalinjurylawyers.org Is it possible make the preview switch to the left side of the mouse if the mouse if on the right side of the page (ie. past a certain point in the x-axis), Somebody posted this code as a solution but I have not been able to implement it: --- Thanks a lot of the extremely useful script! To position the tooltip depending where you are, you need to rewrite some of the code using the offset() property of jQUERY. var toolTipPosition = $(this).offset(); //Declare the Offset object var offsetX = 0; var offsetY = 0; //Then in the hover property $(#tooltip) .css(top,( toolTipPosition.top - posiY) + px)//Will set where the link/thumbnail is horizontally .css(left,( toolTipPosition.left + this.offsetWidth/2 + posiX) + px) /*Will be positioned to the middle of the link/thumbnail, you can alway remove this.offsetWidth/2 to remove the middle placement thing.*/ //Remove the mouseover function and your set! .fadeIn(fast); --- Thanks.
[jQuery] Re: Implementing a Knob Control
James, yes I mean a rotary control. Eric, here's a real-world example of what I'm trying to implement: http://www.niji.or.jp/home/k-nisi/sa-9900-h.jpg I'm looking for control knobs such as those found on a stereo; both continuous ones such as a volume knob, and n-step knobs such as the function knob in that picture, where the knob can only be rotated in n steps. I found some leads which I was going to try. I was going to mix this approach: http://blog.circlecube.com/2008/03/tutorial/interactive-spin-actionscript-tutorial/ with the jquery rotate plugin: http://stackoverflow.com/questions/365820/howto-rotate-image-using-jquery-rotate-plugin Still, your help would be immensely appreciated. Of course I would want the knob image to look like it's rotating, but I also want the control to return a value depending on its position, similar to how a slider returns a value. Thanks again On Jan 26, 10:20 am, Eric Garside gars...@gmail.com wrote: Legofish, I've got a couple ideas which might get the job done, but they all depend on what style of knob you want. Take a look around a google image search, and see if you can find a good representation of the type of knob you want. Then we can go from there. :) On Jan 26, 10:03 am, James Hughes j.hug...@kainos.com wrote: Do you mean a gague control? IE some sort of rotary control vs a slider? From: jquery-en@googlegroups.com on behalf of legofish Sent: Mon 26/01/2009 14:49 To: jQuery (English) Subject: [jQuery] Implementing a Knob Control Hi, I need to implement a knob control for one of my projects (eg. a volume knob). Ideally I would like to use jquery. I have spent some time searching for any resources to get started. Not only I can't find anything in jquery, I can't find anything even resembling a knob implementation in javascript in general. I did find a few sites who sell VB or .net knob controls, but nothing in js. anyway, not sure if anyone can help, but any hints towards a resource or starting point would be much appreciated. This e-mail is intended solely for the addressee and is strictly confidential; if you are not the addressee please destroy the message and all copies. Any opinion or information contained in this email or its attachments that does not relate to the business of Kainos is personal to the sender and is not given by or endorsed by Kainos. Kainos is the trading name of Kainos Software Limited, registered in Northern Ireland under company number: NI19370, having its registered offices at: Kainos House, 4-6 Upper Crescent, Belfast, BT7 1NT, Northern Ireland. Registered in the UK for VAT under number: 454598802 and registered in Ireland for VAT under number: 9950340E. This email has been scanned for all known viruses by MessageLabs but is not guaranteed to be virus free; further terms and conditions may be found on our website -www.kainos.com
[jQuery] Re: Implementing a Knob Control
by the way by this approach I meant the second example on that page. On Jan 26, 1:54 pm, legofish pen...@gmail.com wrote: James, yes I mean a rotary control. Eric, here's a real-world example of what I'm trying to implement: http://www.niji.or.jp/home/k-nisi/sa-9900-h.jpg I'm looking for control knobs such as those found on a stereo; both continuous ones such as a volume knob, and n-step knobs such as the function knob in that picture, where the knob can only be rotated in n steps. I found some leads which I was going to try. I was going to mix this approach:http://blog.circlecube.com/2008/03/tutorial/interactive-spin-actionsc... with the jquery rotate plugin:http://stackoverflow.com/questions/365820/howto-rotate-image-using-jq... Still, your help would be immensely appreciated. Of course I would want the knob image to look like it's rotating, but I also want the control to return a value depending on its position, similar to how a slider returns a value. Thanks again On Jan 26, 10:20 am, Eric Garside gars...@gmail.com wrote: Legofish, I've got a couple ideas which might get the job done, but they all depend on what style of knob you want. Take a look around a google image search, and see if you can find a good representation of the type of knob you want. Then we can go from there. :) On Jan 26, 10:03 am, James Hughes j.hug...@kainos.com wrote: Do you mean a gague control? IE some sort of rotary control vs a slider? From: jquery-en@googlegroups.com on behalf of legofish Sent: Mon 26/01/2009 14:49 To: jQuery (English) Subject: [jQuery] Implementing a Knob Control Hi, I need to implement a knob control for one of my projects (eg. a volume knob). Ideally I would like to use jquery. I have spent some time searching for any resources to get started. Not only I can't find anything in jquery, I can't find anything even resembling a knob implementation in javascript in general. I did find a few sites who sell VB or .net knob controls, but nothing in js. anyway, not sure if anyone can help, but any hints towards a resource or starting point would be much appreciated. This e-mail is intended solely for the addressee and is strictly confidential; if you are not the addressee please destroy the message and all copies. Any opinion or information contained in this email or its attachments that does not relate to the business of Kainos is personal to the sender and is not given by or endorsed by Kainos. Kainos is the trading name of Kainos Software Limited, registered in Northern Ireland under company number: NI19370, having its registered offices at: Kainos House, 4-6 Upper Crescent, Belfast, BT7 1NT, Northern Ireland. Registered in the UK for VAT under number: 454598802 and registered in Ireland for VAT under number: 9950340E. This email has been scanned for all known viruses by MessageLabs but is not guaranteed to be virus free; further terms and conditions may be found on our website -www.kainos.com
[jQuery] Re: Recursion issue with nested lists.
Beautiful! Works like a charm! Thanks again! On Jan 26, 8:20 am, Nicholas nbar...@gmail.com wrote: Thanks Rob Karl. Karl, excellent plugin! I think this is exactly what I need to get around the default text() function. Thanks a million! Nick On Jan 24, 5:35 am, Karl Swedberg k...@englishrules.com wrote: Oh, rats. Sorry about that, Rob. On both counts. Yeah, meant to reply to the OP. And I inadvertently posted links to my local virtual host. Not the first time I've made that boneheaded mistake. Here are the real links: http://plugins.learningjquery.com/textchildren/ http://plugins.learningjquery.com/textchildren/#demo --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On Jan 24, 2009, at 1:00 AM, RobG wrote: On Jan 24, 2:21 pm, Karl Swedberg k...@englishrules.com wrote: [...] I wrote a plugin for this sort of thing: http://plugins.kswedberg/textchildren/ interactive demo: http://plugins.kswedberg/textchildren/#demo I think you meant to reply to the OP, or maybe GG is messing up the thread. For both those links I get: can’t find the server 'plugins.kswedberg' -- Rob
[jQuery] Re: Continuing to Seek Rounded Corners on Absolutely Positioned Elements that Work in IE7
could this be why?: Note that if gradients are used, you will need a min-height (or fixed height) rule on the body of the dialog. If these examples appear *funny at the bottom*, it is because they do not enforce the min-height rule. On Mon, Jan 26, 2009 at 12:33 PM, Vik v...@mindspring.com wrote: The latest approach I'm trying uses a more old-school technique, described here: http://www.schillmania.com/content/projects/even-more-rounded-corners/ For most uses, it works very well. But for absolutely positioned objects, one of the divs seems to disappear in IE7. Here's a demo using it with an absolutely positioned object: http://www.flavorzoom.com/schillmania_tryout/temp.html It looks great in Firefox, but not in IE7. Is there a way to tweak the CSS to get this to work in IE7? Thanks in advance to all for any thoughts!
[jQuery] Re: Implementing a Knob Control
Canvas is probably the most elegant way to go, especially given the type of knobs you want. My suggestion is to find a decent resolution image of the knob you want, then use jquery and canvas to move the knob, and just keep track of the position. Be aware though, the mouse isn't really well designed for a knob kind of motion. On Jan 26, 1:56 pm, legofish pen...@gmail.com wrote: by the way by this approach I meant the second example on that page. On Jan 26, 1:54 pm, legofish pen...@gmail.com wrote: James, yes I mean a rotary control. Eric, here's a real-world example of what I'm trying to implement: http://www.niji.or.jp/home/k-nisi/sa-9900-h.jpg I'm looking for control knobs such as those found on a stereo; both continuous ones such as a volume knob, and n-step knobs such as the function knob in that picture, where the knob can only be rotated in n steps. I found some leads which I was going to try. I was going to mix this approach:http://blog.circlecube.com/2008/03/tutorial/interactive-spin-actionsc... with the jquery rotate plugin:http://stackoverflow.com/questions/365820/howto-rotate-image-using-jq... Still, your help would be immensely appreciated. Of course I would want the knob image to look like it's rotating, but I also want the control to return a value depending on its position, similar to how a slider returns a value. Thanks again On Jan 26, 10:20 am, Eric Garside gars...@gmail.com wrote: Legofish, I've got a couple ideas which might get the job done, but they all depend on what style of knob you want. Take a look around a google image search, and see if you can find a good representation of the type of knob you want. Then we can go from there. :) On Jan 26, 10:03 am, James Hughes j.hug...@kainos.com wrote: Do you mean a gague control? IE some sort of rotary control vs a slider? From: jquery-en@googlegroups.com on behalf of legofish Sent: Mon 26/01/2009 14:49 To: jQuery (English) Subject: [jQuery] Implementing a Knob Control Hi, I need to implement a knob control for one of my projects (eg. a volume knob). Ideally I would like to use jquery. I have spent some time searching for any resources to get started. Not only I can't find anything in jquery, I can't find anything even resembling a knob implementation in javascript in general. I did find a few sites who sell VB or .net knob controls, but nothing in js. anyway, not sure if anyone can help, but any hints towards a resource or starting point would be much appreciated. This e-mail is intended solely for the addressee and is strictly confidential; if you are not the addressee please destroy the message and all copies. Any opinion or information contained in this email or its attachments that does not relate to the business of Kainos is personal to the sender and is not given by or endorsed by Kainos. Kainos is the trading name of Kainos Software Limited, registered in Northern Ireland under company number: NI19370, having its registered offices at: Kainos House, 4-6 Upper Crescent, Belfast, BT7 1NT, Northern Ireland. Registered in the UK for VAT under number: 454598802 and registered in Ireland for VAT under number: 9950340E. This email has been scanned for all known viruses by MessageLabs but is not guaranteed to be virus free; further terms and conditions may be found on our website -www.kainos.com
[jQuery] Re: Implementing a Knob Control
To add canvas support to IE you can use the following script (slower, but works): http://code.google.com/p/explorercanvas/ On Mon, Jan 26, 2009 at 2:41 PM, Eric Garside gars...@gmail.com wrote: Canvas is probably the most elegant way to go, especially given the type of knobs you want. My suggestion is to find a decent resolution image of the knob you want, then use jquery and canvas to move the knob, and just keep track of the position. Be aware though, the mouse isn't really well designed for a knob kind of motion. On Jan 26, 1:56 pm, legofish pen...@gmail.com wrote: by the way by this approach I meant the second example on that page. On Jan 26, 1:54 pm, legofish pen...@gmail.com wrote: James, yes I mean a rotary control. Eric, here's a real-world example of what I'm trying to implement: http://www.niji.or.jp/home/k-nisi/sa-9900-h.jpg I'm looking for control knobs such as those found on a stereo; both continuous ones such as a volume knob, and n-step knobs such as the function knob in that picture, where the knob can only be rotated in n steps. I found some leads which I was going to try. I was going to mix this approach: http://blog.circlecube.com/2008/03/tutorial/interactive-spin-actionsc... with the jquery rotate plugin: http://stackoverflow.com/questions/365820/howto-rotate-image-using-jq... Still, your help would be immensely appreciated. Of course I would want the knob image to look like it's rotating, but I also want the control to return a value depending on its position, similar to how a slider returns a value. Thanks again On Jan 26, 10:20 am, Eric Garside gars...@gmail.com wrote: Legofish, I've got a couple ideas which might get the job done, but they all depend on what style of knob you want. Take a look around a google image search, and see if you can find a good representation of the type of knob you want. Then we can go from there. :) On Jan 26, 10:03 am, James Hughes j.hug...@kainos.com wrote: Do you mean a gague control? IE some sort of rotary control vs a slider? From: jquery-en@googlegroups.com on behalf of legofish Sent: Mon 26/01/2009 14:49 To: jQuery (English) Subject: [jQuery] Implementing a Knob Control Hi, I need to implement a knob control for one of my projects (eg. a volume knob). Ideally I would like to use jquery. I have spent some time searching for any resources to get started. Not only I can't find anything in jquery, I can't find anything even resembling a knob implementation in javascript in general. I did find a few sites who sell VB or .net knob controls, but nothing in js. anyway, not sure if anyone can help, but any hints towards a resource or starting point would be much appreciated. This e-mail is intended solely for the addressee and is strictly confidential; if you are not the addressee please destroy the message and all copies. Any opinion or information contained in this email or its attachments that does not relate to the business of Kainos is personal to the sender and is not given by or endorsed by Kainos. Kainos is the trading name of Kainos Software Limited, registered in Northern Ireland under company number: NI19370, having its registered offices at: Kainos House, 4-6 Upper Crescent, Belfast, BT7 1NT, Northern Ireland. Registered in the UK for VAT under number: 454598802 and registered in Ireland for VAT under number: 9950340E. This email has been scanned for all known viruses by MessageLabs but is not guaranteed to be virus free; further terms and conditions may be found on our website -www.kainos.com
[jQuery] Re: Implementing a Knob Control
If I could second this from a usability perspective. I've used a flash-based interface that had a rotating knob. Moving that with a mouse was counter-intuitive. Dragging a straight slider (horizontal or vertical) just felt a lot better. JK -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Eric Garside Sent: Monday, January 26, 2009 11:41 AM To: jQuery (English) Subject: [jQuery] Re: Implementing a Knob Control Canvas is probably the most elegant way to go, especially given the type of knobs you want. My suggestion is to find a decent resolution image of the knob you want, then use jquery and canvas to move the knob, and just keep track of the position. Be aware though, the mouse isn't really well designed for a knob kind of motion. On Jan 26, 1:56 pm, legofish pen...@gmail.com wrote: by the way by this approach I meant the second example on that page. On Jan 26, 1:54 pm, legofish pen...@gmail.com wrote: James, yes I mean a rotary control. Eric, here's a real-world example of what I'm trying to implement: http://www.niji.or.jp/home/k-nisi/sa-9900-h.jpg I'm looking for control knobs such as those found on a stereo; both continuous ones such as a volume knob, and n-step knobs such as the function knob in that picture, where the knob can only be rotated in n steps. I found some leads which I was going to try. I was going to mix this approach:http://blog.circlecube.com/2008/03/tutorial/interactive-spin-action sc... with the jquery rotate plugin:http://stackoverflow.com/questions/365820/howto-rotate-image-using-jq ... Still, your help would be immensely appreciated. Of course I would want the knob image to look like it's rotating, but I also want the control to return a value depending on its position, similar to how a slider returns a value. Thanks again On Jan 26, 10:20 am, Eric Garside gars...@gmail.com wrote: Legofish, I've got a couple ideas which might get the job done, but they all depend on what style of knob you want. Take a look around a google image search, and see if you can find a good representation of the type of knob you want. Then we can go from there. :) On Jan 26, 10:03 am, James Hughes j.hug...@kainos.com wrote: Do you mean a gague control? IE some sort of rotary control vs a slider? From: jquery-en@googlegroups.com on behalf of legofish Sent: Mon 26/01/2009 14:49 To: jQuery (English) Subject: [jQuery] Implementing a Knob Control Hi, I need to implement a knob control for one of my projects (eg. a volume knob). Ideally I would like to use jquery. I have spent some time searching for any resources to get started. Not only I can't find anything in jquery, I can't find anything even resembling a knob implementation in javascript in general. I did find a few sites who sell VB or .net knob controls, but nothing in js. anyway, not sure if anyone can help, but any hints towards a resource or starting point would be much appreciated. This e-mail is intended solely for the addressee and is strictly confidential; if you are not the addressee please destroy the message and all copies. Any opinion or information contained in this email or its attachments that does not relate to the business of Kainos is personal to the sender and is not given by or endorsed by Kainos. Kainos is the trading name of Kainos Software Limited, registered in Northern Ireland under company number: NI19370, having its registered offices at: Kainos House, 4-6 Upper Crescent, Belfast, BT7 1NT, Northern Ireland. Registered in the UK for VAT under number: 454598802 and registered in Ireland for VAT under number: 9950340E. This email has been scanned for all known viruses by MessageLabs but is not guaranteed to be virus free; further terms and conditions may be found on our website -www.kainos.com
[jQuery] Re: Implementing a Knob Control
thanks jay for the IE support link, I was just looking for that. Also thanks Eric for the suggestion, I'm going to try the other approach first and if it ends up being too complex I'll give canvas a shot. Jeffrey, I sort of agree with you, but I also think the main reason why knobs are such a UI nightmare is because they have never been done right. I already have the same interface implemented using a straight slider. I want to create a knob version of the same thing (I like to try and do it the *right* way) and then have the two versions formally tested in usability groups (I'm lucky to have the resources for the tests) and see if there's any merit in using the knobs Anyway, thanks all. On Jan 26, 2:48 pm, Jeffrey Kretz jeffkr...@hotmail.com wrote: If I could second this from a usability perspective. I've used a flash-based interface that had a rotating knob. Moving that with a mouse was counter-intuitive. Dragging a straight slider (horizontal or vertical) just felt a lot better. JK -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Eric Garside Sent: Monday, January 26, 2009 11:41 AM To: jQuery (English) Subject: [jQuery] Re: Implementing a Knob Control Canvas is probably the most elegant way to go, especially given the type of knobs you want. My suggestion is to find a decent resolution image of the knob you want, then use jquery and canvas to move the knob, and just keep track of the position. Be aware though, the mouse isn't really well designed for a knob kind of motion. On Jan 26, 1:56 pm, legofish pen...@gmail.com wrote: by the way by this approach I meant the second example on that page. On Jan 26, 1:54 pm, legofish pen...@gmail.com wrote: James, yes I mean a rotary control. Eric, here's a real-world example of what I'm trying to implement: http://www.niji.or.jp/home/k-nisi/sa-9900-h.jpg I'm looking for control knobs such as those found on a stereo; both continuous ones such as a volume knob, and n-step knobs such as the function knob in that picture, where the knob can only be rotated in n steps. I found some leads which I was going to try. I was going to mix this approach:http://blog.circlecube.com/2008/03/tutorial/interactive-spin-action sc... with the jquery rotate plugin:http://stackoverflow.com/questions/365820/howto-rotate-image-using-jq ... Still, your help would be immensely appreciated. Of course I would want the knob image to look like it's rotating, but I also want the control to return a value depending on its position, similar to how a slider returns a value. Thanks again On Jan 26, 10:20 am, Eric Garside gars...@gmail.com wrote: Legofish, I've got a couple ideas which might get the job done, but they all depend on what style of knob you want. Take a look around a google image search, and see if you can find a good representation of the type of knob you want. Then we can go from there. :) On Jan 26, 10:03 am, James Hughes j.hug...@kainos.com wrote: Do you mean a gague control? IE some sort of rotary control vs a slider? From: jquery-en@googlegroups.com on behalf of legofish Sent: Mon 26/01/2009 14:49 To: jQuery (English) Subject: [jQuery] Implementing a Knob Control Hi, I need to implement a knob control for one of my projects (eg. a volume knob). Ideally I would like to use jquery. I have spent some time searching for any resources to get started. Not only I can't find anything in jquery, I can't find anything even resembling a knob implementation in javascript in general. I did find a few sites who sell VB or .net knob controls, but nothing in js. anyway, not sure if anyone can help, but any hints towards a resource or starting point would be much appreciated. This e-mail is intended solely for the addressee and is strictly confidential; if you are not the addressee please destroy the message and all copies. Any opinion or information contained in this email or its attachments that does not relate to the business of Kainos is personal to the sender and is not given by or endorsed by Kainos. Kainos is the trading name of Kainos Software Limited, registered in Northern Ireland under company number: NI19370, having its registered offices at: Kainos House, 4-6 Upper Crescent, Belfast, BT7 1NT, Northern Ireland. Registered in the UK for VAT under number: 454598802 and registered in Ireland for VAT under number: 9950340E. This email has been scanned for all known viruses by MessageLabs but is not guaranteed to be virus free; further terms and conditions may be found on our website -www.kainos.com
[jQuery] Re: .val() problem
I think you have to escape the brackets: $('input:radio[name=field_submcategory\\[value\\]]:checked').val() On Jan 26, 3:37 pm, LoicDuros loic.du...@gmail.com wrote: Hi, I have a set of radio buttons with name=field_submcategory[value] I want to figure out what value has been selected, even after the user hits refresh (so .change won't work). I've tried this but the alert I get is always undefined, independently from what button is checked: alert($('input:radio[name=field_submcategory[value]]:checked').val()); Thanks!
[jQuery] Can jQuery calculate CSS Width/Height
jQuery has innerHeight/Width and outerHeight/Width methods, but is there a method that can return a 'CSS Height/Width'. A CSS width is the width that would be applied via CSS to achieve a given 'outer width'. This value will differ depending on the box model and other older browser idiosyncracies. Here is an example... DIV#Test { width: 90%; height: auto; padding: 7px; margin: 11px; border: 3px solid #000; } DIV id=Test line1 BR line 2 BR line 3 /DIV Now I want to increase the DIV width height by 1-pixel. To do so, I need the current 'pixel width/height' that is equivent to its current size. AFAIK, $(#Test).innerWidth() will not address this. Is there another dimension method that can? I already have a custom function to calculate this, but I'm wondering if I am missing something in jQuery that would simplify my code? If not, I may suggest such a method for jQuery, but want to be sure it doesn't already exist! Does anyone have knowledge of this? /Kevin
[jQuery] Autocomplete Plug-in: Submit with TAB?
Hi! New to this list. I have a question about the Autocomplete Plug-in: http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/ http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/ Is it possible to submit the form when the user leaves the result list with the TAB-key? If yes, can any one please give an example? Best Regards Sandstream http://www.sandstream.se/ 13_ts_mail mvh Perra Sandström - pe...@sandstream.se Webmaster - www.sandstream.se http://www.sandstream.se/ inline: image001.gif
[jQuery] Re: Can JQuery solve the iframe height=100% problem?
Hi Dave, This plugin may be more than you need, but... The UI/Layout widget will automatically position and size an iframe (or other element) to fill the entire page, OR allow for a header, footer, or sidebars. The code and markup are dead-simple. Here is an example with a page-banner and an iframe. Everything is done for you, including eliminating the 'body scrollbar'... $(document).ready(function(){ $(body).layout({ closable: false , resizable: false , spacing_open: 0 }); }); DIV class=ui-layout-north [Banner here] /DIV IFRAME class=ui-layout-center src=myIframe.html ... That's it! I recommend setting an iframe width height for non- Javascript browsers, but it's not necessary for Layout. Plus you must set your preferred iframe options, like scrolling, border, padding, etc. Plug-in website: http://layout.jquery-dev.net Simple iframe demo: http://layout.jquery-dev.net/demos/frames.html The Layout website itself used iframe pages with a 'banner', like: http://layout.jquery-dev.net/discuss.html Hope this helps. /Kevin On Jan 26, 6:55 am, laredotorn...@zipmail.com laredotorn...@zipmail.com wrote: My iframe is also hard-coded. But here is what I get when I do console.log statements ... $('#fileTreeIframe').load( function() { var $ifbody = $(this).contents().find ( 'body' ); console.log($ifbody); // Outputs Object length=1 0=body prevObject=Object jquery=1.2.6 $ifbody.css( 'height','auto' ); console.log($ifbody.height()); // Outputs 0 $(this).height( $ifbody.height() ); }); Obviously the troubling thing here is that height is outputting zero. Can you provide the HTML that surrounds your hard-coded iframe? There must be something else I'm not setting in the CSS or HTML. Thanks, - Dave On Jan 25, 1:53 pm, dbzz j...@briskey.net wrote: i have the iframe hardcoded in the html. if you are adding it to the dom with js, it won't get the load event binding. you might try livequery or something like it. On Jan 25, 10:21 am, laredotorn...@zipmail.com laredotorn...@zipmail.com wrote: Hi dbzz, I tried the code you provided, but went from this ... http://screencast.com/t/W8lOtgKO to the iframe disappearing entirely ... http://screencast.com/t/jCTjOLhpeX I put your code in a $(document).ready() block (below). Are there any other modifications I should make to get it to display at 100%? $(document).ready(function() { $('#fileTreeIframe').load( function() { var $ifbody = $(this).contents().find ( 'body' ); $ifbody.css( 'height','auto' ); $(this).height( $ifbody.height() ); }); }); Thanks, - Dave- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text -
[jQuery] Re: Can JQuery solve the iframe height=100% problem?
(Sorry if this is a duplicate post) Hi Dave, This plugin may be more than you need, but... The UI/Layout widget will automatically position and size an iframe (or other element) to fill the entire page, OR allow for a header, footer, or sidebars. The code and markup are dead-simple. Here is an example with a page-banner and an iframe. Everything is done for you, including eliminating the 'body scrollbar'... $(document).ready(function(){ $(body).layout({ closable: false , resizable: false , spacing_open: 0 }); }); DIV class=ui-layout-north [Banner here] /DIV IFRAME class=ui-layout-center src=myIframe.html ... That's it! I recommend setting an iframe width height for non- Javascript browsers, but it's not necessary for Layout. Plus you must set your preferred iframe options, like scrolling, border, padding, etc. Plug-in website: http://layout.jquery-dev.net Simple iframe demo: http://layout.jquery-dev.net/demos/frames.html The Layout website itself used iframe pages with a 'banner', like: http://layout.jquery-dev.net/discuss.html Hope this helps. /Kevin On Jan 24, 5:15 pm, laredotorn...@zipmail.com laredotorn...@zipmail.com wrote: Hi, I'm trying to get my iframe to occupy 100% of its parent block element. But the height=100% attribute in CSS isn't doing the trick. Here's my HTML td width=177 height=100% valign=top class=content- ruleiframe id=fileTreeIframe style=border:0px none #ff; src=file_tree.php border=0 width=100% scroll=auto/iframe/ td and the CSS ... iframe { display:block; height:100%; width:100%; border:none; } It doesn't look good right now --http://screencast.com/t/mIzGnUikC. Can JQuery help me make my iframe occupy 100% of its parent element? Thanks, - Dave
[jQuery] [autocomplete] Autocompletion in dynamic inputs
Hello, i'm using the autocomplete plugin (http://docs.jquery.com/Plugins/ Autocomplete) on my site. On static inputs, it worked fine: HTML: form autocomplete=off input type=text id=suggest / input type=button value=Search OnClick=something() / /form jQuery: $(document).ready(function() { $(#suggest).autocomplete('searchbox', { width: 210, multiple: false, matchContains: false, formatItem: formatItem, formatResult: formatResult }); }); But now, I want to create an dynamic Input: HTML: li id=addnewtaga href=javascript:addTag()Add new Tag/a/li jQuery/Javascript: function addTag() { $(li#addnewtag).before('liform autocomplete=offinput type=text id=suggest_addtag //form/li'); } This works fine again. But all tries to enable autocomplete for this imput were not (realy) successful. The ready-function isn't fired again, and the new live()-function worked, but not realy good. The suggestions are not displayed all times as they should. :-( I hope, someone could help me?! Thanks
[jQuery] Re: Continuing to Seek Rounded Corners on Absolutely Positioned Elements that Work in IE7
I just changed the position attribute from relative to absolute on one css rule: .dialog .b { /* bottom */ position:absolute; width:100%; } ...and it seems to be working now in IE7. Here's an updated demo page: http://www.flavorzoom.com/schillmania_tryout_2/temp.html I've just begun testing, but so far it seems to be working.
[jQuery] Re: Implementing a Knob Control
Audio editing software has lots of knobs, and they're not hard to use. The thing is you don't turn them with a circular motion, but you click and drag up/down or right/left just like a slider, the rotary control gives you visual feedback while saving a lot of space. This was real fun: http://jsbin.com/apida/ http://jsbin.com/apida/edit thanks to raphaeljs.com cheers, - ricardo On Jan 26, 5:48 pm, Jeffrey Kretz jeffkr...@hotmail.com wrote: If I could second this from a usability perspective. I've used a flash-based interface that had a rotating knob. Moving that with a mouse was counter-intuitive. Dragging a straight slider (horizontal or vertical) just felt a lot better. JK -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Eric Garside Sent: Monday, January 26, 2009 11:41 AM To: jQuery (English) Subject: [jQuery] Re: Implementing a Knob Control Canvas is probably the most elegant way to go, especially given the type of knobs you want. My suggestion is to find a decent resolution image of the knob you want, then use jquery and canvas to move the knob, and just keep track of the position. Be aware though, the mouse isn't really well designed for a knob kind of motion. On Jan 26, 1:56 pm, legofish pen...@gmail.com wrote: by the way by this approach I meant the second example on that page. On Jan 26, 1:54 pm, legofish pen...@gmail.com wrote: James, yes I mean a rotary control. Eric, here's a real-world example of what I'm trying to implement: http://www.niji.or.jp/home/k-nisi/sa-9900-h.jpg I'm looking for control knobs such as those found on a stereo; both continuous ones such as a volume knob, and n-step knobs such as the function knob in that picture, where the knob can only be rotated in n steps. I found some leads which I was going to try. I was going to mix this approach:http://blog.circlecube.com/2008/03/tutorial/interactive-spin-action sc... with the jquery rotate plugin:http://stackoverflow.com/questions/365820/howto-rotate-image-using-jq ... Still, your help would be immensely appreciated. Of course I would want the knob image to look like it's rotating, but I also want the control to return a value depending on its position, similar to how a slider returns a value. Thanks again On Jan 26, 10:20 am, Eric Garside gars...@gmail.com wrote: Legofish, I've got a couple ideas which might get the job done, but they all depend on what style of knob you want. Take a look around a google image search, and see if you can find a good representation of the type of knob you want. Then we can go from there. :) On Jan 26, 10:03 am, James Hughes j.hug...@kainos.com wrote: Do you mean a gague control? IE some sort of rotary control vs a slider? From: jquery-en@googlegroups.com on behalf of legofish Sent: Mon 26/01/2009 14:49 To: jQuery (English) Subject: [jQuery] Implementing a Knob Control Hi, I need to implement a knob control for one of my projects (eg. a volume knob). Ideally I would like to use jquery. I have spent some time searching for any resources to get started. Not only I can't find anything in jquery, I can't find anything even resembling a knob implementation in javascript in general. I did find a few sites who sell VB or .net knob controls, but nothing in js. anyway, not sure if anyone can help, but any hints towards a resource or starting point would be much appreciated. This e-mail is intended solely for the addressee and is strictly confidential; if you are not the addressee please destroy the message and all copies. Any opinion or information contained in this email or its attachments that does not relate to the business of Kainos is personal to the sender and is not given by or endorsed by Kainos. Kainos is the trading name of Kainos Software Limited, registered in Northern Ireland under company number: NI19370, having its registered offices at: Kainos House, 4-6 Upper Crescent, Belfast, BT7 1NT, Northern Ireland. Registered in the UK for VAT under number: 454598802 and registered in Ireland for VAT under number: 9950340E. This email has been scanned for all known viruses by MessageLabs but is not guaranteed to be virus free; further terms and conditions may be found on our website -www.kainos.com
[jQuery] Tabbed user interface
Hi, I'm trying to build a tabbed user interface based upon the themeroller css and demo.html found in the themeroller zip file. It connects to a database and loads data into the tabs when required. The interface is set-up to provide a customer back-end, so that the customer can update their account, adjust settings, view recent notices etc. Hopefully, this should be applicable to what other people are building. I've made a start (see http://jquerytabbedinterface.blogspot.com/ and http://www.yyytest.com/jquery/demo.asp?UI=12345678) and will document the changes I've made along the way. If some of you could take a look, comment via the blog etc. I would be most grateful. Right now I'm having issues with the slide toggle on the 'Second' tab. It is intended to update a database field from 0 to 1 (and vice versa), but I can't get it to work. I'd also be grateful as to the correct way of using the jQuery code, and the organisation of the tab site pages etc. Cheers, Alex
[jQuery] jquery 1.2.6 focus problem?
Hey all, Our project is using 1.2.6, but we seem to have an issue with calling: $('#some-textbox-id').focus(); The element focuses properly, but it seems like the next time you press the tab key the focus completely disappears and you have to hit it several times to get it back into the flow of the document rather then going to the next focusable element in the DOM. Is this a bug or am I missing something? If you click back onto the document and focus on something it will resume the natural behavior. thanks, -Chris
[jQuery] Any way to get all attibutes of a node?
Is there any way to use jquery to get an array of all attributes a given node has? I'm writing some code to process a page where the user might have added custom attribute names that I can't know about in advance but need to detect.
[jQuery] Re: tooltip - image preview does not respect window border
You probably need to upgrade jQuery as well, the tooltip plugin was released with support for 1.2.6. Jörn On Mon, Jan 26, 2009 at 7:50 PM, CNN_news nagit...@gmail.com wrote: Thanks, I replaced jquery.tooltip.js and jquery.tooltip.css with the new versions and the tooltips stopped working alltogether. In my wordpress theme folder I have a jquery directory. In this directory I have the following files: global.js jquery.js jquery.tabs.css jquery.tabs.pack.js jquery.tabs-ie.css jquery.tooltip.css jquery.tooltip.js jquery-1.1.3.1.pack.js I tried several ways to upgrade the tooltip but with no luck. Thanks, Nagita On Jan 25, 5:23 am, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: It looks like you got an old version of the plugin. Try the latest release, it has built-in support for repositioning the tooltip at the viewport border:http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/ Jörn On Sat, Jan 24, 2009 at 11:26 PM, CNN_news nagit...@gmail.com wrote: Hello, I have a theme that shows a preview of the image that the mouse is currently hovering over with a larger image using jquery tooltip. The problem is that it always places the preview on the right and if the image is on the right side of the page the preview causes horizontal scrolling, see for yourself: http://torontopersonalinjurylawyers.org Is it possible make the preview switch to the left side of the mouse if the mouse if on the right side of the page (ie. past a certain point in the x-axis), Somebody posted this code as a solution but I have not been able to implement it: --- Thanks a lot of the extremely useful script! To position the tooltip depending where you are, you need to rewrite some of the code using the offset() property of jQUERY. var toolTipPosition = $(this).offset(); //Declare the Offset object var offsetX = 0; var offsetY = 0; //Then in the hover property $(#tooltip) .css(top,( toolTipPosition.top - posiY) + px)//Will set where the link/thumbnail is horizontally .css(left,( toolTipPosition.left + this.offsetWidth/2 + posiX) + px) /*Will be positioned to the middle of the link/thumbnail, you can alway remove this.offsetWidth/2 to remove the middle placement thing.*/ //Remove the mouseover function and your set! .fadeIn(fast); --- Thanks.
[jQuery] IE Reports 0 children()
FF works fine, IE however reports 0 children() and I am finding it difficult to solve. Example XML retrieve from $.get: ?xml version=1.0 encoding=UTF-8? letter paragraphtext paragraphtext /paragraph/paragraph paragraphtext/paragraph /letter The code: jQuery.get(process.asp, {job:getLetter, letterID:letterName, type:xml}, function(xml){ alert(jQuery(xml).children().length); } Have I got awry somewhere? Seems pretty straight forward. I've tried removing the xml doc definition as well as the letter tags. IE always reports 0 children. Thanks, Nick
[jQuery] Re: Implementing a Knob Control
I can't actually even get the demo posted to work. When I pull left, I expect the knob to continue moving left, but you have to physically drag up and to the left to move it, which is pretty hard to do. What if the knob was set to work like a slider, where a positive vertical or horizontal movement of the mouse increases it, and a negative vertical or horizontal movement decreases it? On Jan 26, 4:14 pm, Ricardo Tomasi ricardob...@gmail.com wrote: Audio editing software has lots of knobs, and they're not hard to use. The thing is you don't turn them with a circular motion, but you click and drag up/down or right/left just like a slider, the rotary control gives you visual feedback while saving a lot of space. This was real fun: http://jsbin.com/apida/http://jsbin.com/apida/edit thanks to raphaeljs.com cheers, - ricardo On Jan 26, 5:48 pm, Jeffrey Kretz jeffkr...@hotmail.com wrote: If I could second this from a usability perspective. I've used a flash-based interface that had a rotating knob. Moving that with a mouse was counter-intuitive. Dragging a straight slider (horizontal or vertical) just felt a lot better. JK -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Eric Garside Sent: Monday, January 26, 2009 11:41 AM To: jQuery (English) Subject: [jQuery] Re: Implementing a Knob Control Canvas is probably the most elegant way to go, especially given the type of knobs you want. My suggestion is to find a decent resolution image of the knob you want, then use jquery and canvas to move the knob, and just keep track of the position. Be aware though, the mouse isn't really well designed for a knob kind of motion. On Jan 26, 1:56 pm, legofish pen...@gmail.com wrote: by the way by this approach I meant the second example on that page. On Jan 26, 1:54 pm, legofish pen...@gmail.com wrote: James, yes I mean a rotary control. Eric, here's a real-world example of what I'm trying to implement: http://www.niji.or.jp/home/k-nisi/sa-9900-h.jpg I'm looking for control knobs such as those found on a stereo; both continuous ones such as a volume knob, and n-step knobs such as the function knob in that picture, where the knob can only be rotated in n steps. I found some leads which I was going to try. I was going to mix this approach:http://blog.circlecube.com/2008/03/tutorial/interactive-spin-action sc... with the jquery rotate plugin:http://stackoverflow.com/questions/365820/howto-rotate-image-using-jq ... Still, your help would be immensely appreciated. Of course I would want the knob image to look like it's rotating, but I also want the control to return a value depending on its position, similar to how a slider returns a value. Thanks again On Jan 26, 10:20 am, Eric Garside gars...@gmail.com wrote: Legofish, I've got a couple ideas which might get the job done, but they all depend on what style of knob you want. Take a look around a google image search, and see if you can find a good representation of the type of knob you want. Then we can go from there. :) On Jan 26, 10:03 am, James Hughes j.hug...@kainos.com wrote: Do you mean a gague control? IE some sort of rotary control vs a slider? From: jquery-en@googlegroups.com on behalf of legofish Sent: Mon 26/01/2009 14:49 To: jQuery (English) Subject: [jQuery] Implementing a Knob Control Hi, I need to implement a knob control for one of my projects (eg. a volume knob). Ideally I would like to use jquery. I have spent some time searching for any resources to get started. Not only I can't find anything in jquery, I can't find anything even resembling a knob implementation in javascript in general. I did find a few sites who sell VB or .net knob controls, but nothing in js. anyway, not sure if anyone can help, but any hints towards a resource or starting point would be much appreciated. This e-mail is intended solely for the addressee and is strictly confidential; if you are not the addressee please destroy the message and all copies. Any opinion or information contained in this email or its attachments that does not relate to the business of Kainos is personal to the sender and is not given by or endorsed by Kainos. Kainos is the trading name of Kainos Software Limited, registered in Northern Ireland under company number: NI19370, having its registered offices at: Kainos House, 4-6 Upper Crescent, Belfast, BT7 1NT, Northern Ireland. Registered in the UK for VAT under number: 454598802 and registered in Ireland for VAT under number: 9950340E. This email has been scanned for all known viruses by
[jQuery] Re: Implementing a Knob Control
thanks ricardo, I wish I had seen the link earlier, I spent most of the day trying to implement something similar. My code is very messy though so I won't post it. I know that audio app users like the paradigm you just explained (knob responding to up-down or left-right mouse movement), but I actually don't like that interaction model very much and I think that's part of the reason average people get frustrated with them. The one I implemented responds to circular motions, so you would drag the knob and move it in a circular trajectory and it follows the movement. I think that's most natural and intuitive. If i clean up my code I'll post a sample here. Thanks again On Jan 26, 4:14 pm, Ricardo Tomasi ricardob...@gmail.com wrote: Audio editing software has lots of knobs, and they're not hard to use. The thing is you don't turn them with a circular motion, but you click and drag up/down or right/left just like a slider, the rotary control gives you visual feedback while saving a lot of space. This was real fun: http://jsbin.com/apida/http://jsbin.com/apida/edit thanks to raphaeljs.com cheers, - ricardo On Jan 26, 5:48 pm, Jeffrey Kretz jeffkr...@hotmail.com wrote: If I could second this from a usability perspective. I've used a flash-based interface that had a rotating knob. Moving that with a mouse was counter-intuitive. Dragging a straight slider (horizontal or vertical) just felt a lot better. JK -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Eric Garside Sent: Monday, January 26, 2009 11:41 AM To: jQuery (English) Subject: [jQuery] Re: Implementing a Knob Control Canvas is probably the most elegant way to go, especially given the type of knobs you want. My suggestion is to find a decent resolution image of the knob you want, then use jquery and canvas to move the knob, and just keep track of the position. Be aware though, the mouse isn't really well designed for a knob kind of motion. On Jan 26, 1:56 pm, legofish pen...@gmail.com wrote: by the way by this approach I meant the second example on that page. On Jan 26, 1:54 pm, legofish pen...@gmail.com wrote: James, yes I mean a rotary control. Eric, here's a real-world example of what I'm trying to implement: http://www.niji.or.jp/home/k-nisi/sa-9900-h.jpg I'm looking for control knobs such as those found on a stereo; both continuous ones such as a volume knob, and n-step knobs such as the function knob in that picture, where the knob can only be rotated in n steps. I found some leads which I was going to try. I was going to mix this approach:http://blog.circlecube.com/2008/03/tutorial/interactive-spin-action sc... with the jquery rotate plugin:http://stackoverflow.com/questions/365820/howto-rotate-image-using-jq ... Still, your help would be immensely appreciated. Of course I would want the knob image to look like it's rotating, but I also want the control to return a value depending on its position, similar to how a slider returns a value. Thanks again On Jan 26, 10:20 am, Eric Garside gars...@gmail.com wrote: Legofish, I've got a couple ideas which might get the job done, but they all depend on what style of knob you want. Take a look around a google image search, and see if you can find a good representation of the type of knob you want. Then we can go from there. :) On Jan 26, 10:03 am, James Hughes j.hug...@kainos.com wrote: Do you mean a gague control? IE some sort of rotary control vs a slider? From: jquery-en@googlegroups.com on behalf of legofish Sent: Mon 26/01/2009 14:49 To: jQuery (English) Subject: [jQuery] Implementing a Knob Control Hi, I need to implement a knob control for one of my projects (eg. a volume knob). Ideally I would like to use jquery. I have spent some time searching for any resources to get started. Not only I can't find anything in jquery, I can't find anything even resembling a knob implementation in javascript in general. I did find a few sites who sell VB or .net knob controls, but nothing in js. anyway, not sure if anyone can help, but any hints towards a resource or starting point would be much appreciated. This e-mail is intended solely for the addressee and is strictly confidential; if you are not the addressee please destroy the message and all copies. Any opinion or information contained in this email or its attachments that does not relate to the business of Kainos is personal to the sender and is not given by or endorsed by Kainos. Kainos is the trading name of Kainos Software Limited, registered in Northern Ireland under company number:
[jQuery] Submit button usage for SimpleModal - what am I missing?
Hi, I am using SimpleModal, and would like to fire a modal on the click of an input button. When the function fires, it flashes the modal for a brief moment and then dissapears... can anyone give me a hand? It's pretty basic: input name=button1 type=image onclick=$('#myDiv').modal ('test'); value=Calculate src=calc/images/Calculate_btn.gif / Any ideas? Apologies if this is not where to post to...
[jQuery] disable submit not working in IE7
I'm using JQuery 1.2.6 with the following script: script type=text/javascript!-- $(document).ready(function(){ $(button.submitButton).click(function () { $(this).attr(disabled,true).html(Processing, please wait...); $(button).attr(disabled,true); }) }); // --/script It works as expected in FF3 but is is slightly broken in IE7. On initial click, the submit button appears to take focus, on second click, the Processing... message appears and the button is disabled. The problem is that it the form is then never submitted. Any ideas on how I might fix this to work in IE7 as well? Thanks!
[jQuery] accordion plugin in ie7 does not fully collapse
I'm using the accordion plugin to achieve as a wizard for a multi-part form. in ie7, the li don't fully collapse so the form does not fix all the way to the top. it does not happen in firefox. does anyone know of a way to fix this issue? i thought the most recent version of the accordion take care of the problem based on reading, but it is to no avail. any help, directions are greatly appreciated. thanks
[jQuery] Re: Can jQuery calculate CSS Width/Height
$('#Test').css('width') ? On Jan 26, 11:46 am, Kevin Dalman kevin.dal...@gmail.com wrote: jQuery has innerHeight/Width and outerHeight/Width methods, but is there a method that can return a 'CSS Height/Width'. A CSS width is the width that would be applied via CSS to achieve a given 'outer width'. This value will differ depending on the box model and other older browser idiosyncracies. Here is an example... DIV#Test { width: 90%; height: auto; padding: 7px; margin: 11px; border: 3px solid #000; } DIV id=Test line1 BR line 2 BR line 3 /DIV Now I want to increase the DIV width height by 1-pixel. To do so, I need the current 'pixel width/height' that is equivent to its current size. AFAIK, $(#Test).innerWidth() will not address this. Is there another dimension method that can? I already have a custom function to calculate this, but I'm wondering if I am missing something in jQuery that would simplify my code? If not, I may suggest such a method for jQuery, but want to be sure it doesn't already exist! Does anyone have knowledge of this? /Kevin
[jQuery] Re: IE Reports 0 children()
Got it!! if(jQuery.browser.msie){ var doc = new ActiveXObject(MSXML2.DOMDocument.4.0); doc.loadXML(xml) alert(jQuery(letter, doc).children().length); } On Jan 26, 1:39 pm, Nicholas nbar...@gmail.com wrote: FF works fine, IE however reports 0 children() and I am finding it difficult to solve. Example XML retrieve from $.get: ?xml version=1.0 encoding=UTF-8? letter paragraphtext paragraphtext /paragraph/paragraph paragraphtext/paragraph /letter The code: jQuery.get(process.asp, {job:getLetter, letterID:letterName, type:xml}, function(xml){ alert(jQuery(xml).children().length); } Have I got awry somewhere? Seems pretty straight forward. I've tried removing the xml doc definition as well as the letter tags. IE always reports 0 children. Thanks, Nick
[jQuery] Re: Any way to get all attibutes of a node?
Hi David, I posted this in reply to a similar question a couple weeks ago: var a = $('yourNode')[0].attributes, attrs = []; for (i=0; i a.length; i++) { attrs.push(a[i].nodeName + ': ' + a[i].nodeValue); } console.log(attrs); Not sure how well this will work in other browsers, but it does the trick in Firefox. Of course, you'll need to do something other than console.log() with the results if you're in IE. Hope that helps get you started. --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Jan 26, 2009, at 3:52 PM, David wrote: Is there any way to use jquery to get an array of all attributes a given node has? I'm writing some code to process a page where the user might have added custom attribute names that I can't know about in advance but need to detect.
[jQuery] Re: tooltip - image preview does not respect window border
Also, it looks like you're loading 2 copies of jQuery: jquery.js and jquery-1.1.3.1.pack.js That can't help matters. --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Jan 26, 2009, at 4:19 PM, Jörn Zaefferer wrote: You probably need to upgrade jQuery as well, the tooltip plugin was released with support for 1.2.6. Jörn On Mon, Jan 26, 2009 at 7:50 PM, CNN_news nagit...@gmail.com wrote: Thanks, I replaced jquery.tooltip.js and jquery.tooltip.css with the new versions and the tooltips stopped working alltogether. In my wordpress theme folder I have a jquery directory. In this directory I have the following files: global.js jquery.js jquery.tabs.css jquery.tabs.pack.js jquery.tabs-ie.css jquery.tooltip.css jquery.tooltip.js jquery-1.1.3.1.pack.js I tried several ways to upgrade the tooltip but with no luck. Thanks, Nagita On Jan 25, 5:23 am, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: It looks like you got an old version of the plugin. Try the latest release, it has built-in support for repositioning the tooltip at the viewport border:http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/ Jörn On Sat, Jan 24, 2009 at 11:26 PM, CNN_news nagit...@gmail.com wrote: Hello, I have a theme that shows a preview of the image that the mouse is currently hovering over with a larger image using jquery tooltip. The problem is that it always places the preview on the right and if the image is on the right side of the page the preview causes horizontal scrolling, see for yourself: http://torontopersonalinjurylawyers.org Is it possible make the preview switch to the left side of the mouse if the mouse if on the right side of the page (ie. past a certain point in the x-axis), Somebody posted this code as a solution but I have not been able to implement it: --- Thanks a lot of the extremely useful script! To position the tooltip depending where you are, you need to rewrite some of the code using the offset() property of jQUERY. var toolTipPosition = $(this).offset(); //Declare the Offset object var offsetX = 0; var offsetY = 0; //Then in the hover property $(#tooltip) .css(top,( toolTipPosition.top - posiY) + px)//Will set where the link/thumbnail is horizontally .css(left,( toolTipPosition.left + this.offsetWidth/2 + posiX) + px) /*Will be positioned to the middle of the link/thumbnail, you can alway remove this.offsetWidth/2 to remove the middle placement thing.*/ //Remove the mouseover function and your set! .fadeIn(fast); --- Thanks.
[jQuery] Re: disable submit not working in IE7
A couple things you might want to look at: 1. Does your button have type=submit ? It will need to if you want to submit with it in IE. 2. The disabled attribute value should be true, not true. --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Jan 26, 2009, at 4:55 PM, GBartels wrote: I'm using JQuery 1.2.6 with the following script: script type=text/javascript!-- $(document).ready(function(){ $(button.submitButton).click(function () { $(this).attr(disabled,true).html(Processing, please wait...); $(button).attr(disabled,true); }) }); // --/script It works as expected in FF3 but is is slightly broken in IE7. On initial click, the submit button appears to take focus, on second click, the Processing... message appears and the button is disabled. The problem is that it the form is then never submitted. Any ideas on how I might fix this to work in IE7 as well? Thanks!
[jQuery] Re: disable submit not working in IE7
Thank you Karl for the reply. The button is indeed of type=submit and the form was working in IE prior to adding the above script. I also changed the attribute value to true (removing the quotes). Sadly, I'm still getting the same results in IE. On Jan 26, 4:10 pm, Karl Swedberg k...@englishrules.com wrote: A couple things you might want to look at: 1. Does your button have type=submit ? It will need to if you want to submit with it in IE. 2. The disabled attribute value should be true, not true. --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On Jan 26, 2009, at 4:55 PM, GBartels wrote: I'm using JQuery 1.2.6 with the following script: script type=text/javascript!-- $(document).ready(function(){ $(button.submitButton).click(function () { $(this).attr(disabled,true).html(Processing, please wait...); $(button).attr(disabled,true); }) }); // --/script It works as expected in FF3 but is is slightly broken in IE7. On initial click, the submit button appears to take focus, on second click, the Processing... message appears and the button is disabled. The problem is that it the form is then never submitted. Any ideas on how I might fix this to work in IE7 as well? Thanks!