[jQuery] Re: Look mum, TABS layout only with CSS !!
I agree George, that is FULL compatible with my approach: * dl is equivalent to the container (div) o dt each one is equivalent to a header (dt, div, h, ...: convert them to DIV behavior) o dd each one is equivalent to a body (dd, div, p, etc...: convert them to DIV behavior) I have adapted the demo (the last one combination is composed of DT-DD pairs). So I have adapted also the CSS (which remains the same, once you reset dl,dd and dt to a div behavior): http://www.ita.es/jquery/tabs_only_css.htm thanx George for your suggestion. Now I see that with this DOM structure, it doesn't matter the TAGs applied if they are conveniently converted to DIV behavior via CSS. This should be taken into consideration when creating the plugin;-) El 17/01/2008 22:12, George escribió: FWIW, I prefer the dl approach where - tab labels are made from dt's and - tab contents are made from dd's George On Jan 15, 5:31 pm, Enrique Meléndez Estrada [EMAIL PROTECTED] wrote: Looking at official TABs plugin, I realized that the HTML structure is not very natural. It uses a list (UL) of tab headers follow by tab bodies (DIV). Normally, what you get from your favorite CMS is something more like : a header (div, h,...), its body (div), another header (div, h, ...), its body (div), etc... My challenge was, using this last natural HTML structure, try to layout it in a TABs way. I think I've got it: http://www.ita.es/jquery/tabs_only_css.htm , where practically I have used the same HTML for all 8 TABS combinations. The result is compatible with IE6, IE7, FF and Opera. But there are some limitations to take into account when implementing as a Jquery plugin (as I wish, ;-): * Only versions topRight, topLeft, leftTop and rightTop are100% automatic (CSS doesn't depend on TABs number, height and width). * Versions leftBottom, rightBottom, bottomLeft and bottomRight depends on TABS number, and the height and/or width applied (This is very jquerysh-able) * I used QUIRK format (see doctype in HTML) for IE: the same CSS for IE6 and IE7, but in STRICT format it would only work in IE7 (I don't control IE6 by now) * Body TABs height is fixed (100px) and scroll appears where content doesn't fit. In case of non-liquid TABs, with fixed width, it could be possible to automatically calculate height for no-scroll body via jquery-script with 3 modes: * 1. height fixed: like now in the example. 2. height max: fixed to maximum no-scroll body TAB height. 3. height auto: calculating each no-scroll body TAB height. With all this, next steps would be: to search a little more for IE6 STRICT mode compatibility, and to create a Jquery plugin (with CSS dinamically generated?) Any suggestions, help, critics, comments, are very welcome. -- Enrique Meléndez Estrada (2367) Servicios Informáticos Organización y Servicios Internos Instituto Tecnológico de Aragón -- Enrique Meléndez Estrada (2367) Servicios Informáticos Organización y Servicios Internos Instituto Tecnológico de Aragón
[jQuery] Re: Reverse IP Lookup
Easiest way might be to purchase an IP lookup database and did it yourself. On Jan 18, 4:22 pm, timothytoe [EMAIL PROTECTED] wrote: It's reasonably easy to get it down to a zipcode. But beyond that I don't think it's possible. IPs are way too dynamic. --tt On Jan 17, 6:12 pm, Glen Lipka [EMAIL PROTECTED] wrote: Sorry, research on this topic has just left me desperate. I need to find a commercial company that provides a Reverse IP Lookup as a web service. So I would pass: 63.82.2.35 and it would spit back ideally: Marketo, Address, City, State, Zip etc. Anyone have experience with this kind of service? Email me offline. Thanks, Glen
[jQuery] Updated to Interface 1.2 and now my Sortables don't work
Hi all, I just upgraded from an old Interface version (I don't know what it was, but I downloaded it from the jQuery documentation website a few weeks ago) to the latest release, v1.2. Now my sortable list has stopped working properly. Each of the portlets will now only drag once. The first drag for each portlet works exactly as you'd expect, but as soon as you've initiated a drag, it won't drag again. The other portlets will drag (until you do them once too). There are no javascript errors, and if I revert to the older interface release (keeping the html exactly as shown below) the drag events work as desired. Any ideas? Thanks for your help Steve div id=columns div class=column div class=portlet pTest 1/p /div div class=portlet pTest 2/p /div div class=portlet pTest 3/p /div /div div class=column/div div class=column/div /div!-- /.columns -- $('.column').Sortable( { accept: 'portlet', helperclass: 'sort_placeholder', opacity: 0.7, tolerance: 'intersect' } );
[jQuery] jeditable question
Hello, I have been using jeditable just fine, until I tried with French accents. Does anyone know why French accents will return accènt? Also if I try to reedit and save, without doing anything, it will multiply itself, over and over to the extent that a 3 letters word will strech full page width after 3 or four clicks. Only for those entries with accents. I am a little baffle by that. It's not happening on the plugin site, it's not happening anywhere else on my site. And it is happening before the database insert, probably at the ajax request. ___ Lionel Martelly
[jQuery] Selectors with this keyword
Hi Guys, What im after is using selectors with the 'this' keyword. I imagine this is a fairly common example, but I cant seem to get the syntax right. Example: $(ul:has(li)) except i want to use something like: $(this:has(li)) Thanks
[jQuery] How to validate form controls
Hi, i have 3 textboxes under div id=mydiv. i would like to validate the Textbox ie textbox is empty. i have done validation for each individual textbox by using their id,but i need coding for validate the TextBox using div id ie mydiv. Waiting for your favourable reply, karthik d.s
[jQuery] Re: validation + niceforms - missing styles
Hi, I have fixed this. niceforms.js: (~ line 482) jQuery(txtRight) .attr({src:jQuery.NiceJForms.options.imagesPath + input_right.gif}) /* 6epcepk's hack [nice forms + ] set right image id */ .attr({id:n-f-r-i- + $(jQuery.NiceJForms.texts[q]).attr('id')}) .addClass(inputCorner); validations.js: (~ line 837) if ( !this.labelContainer.append(label).length ) this.settings.errorPlacement ? this.settings.errorPlacement(label, jQuery(element) ) : label.insertAfter('#n-f-r-i-' + this.idOrName(element)); All works fine form me ;) -- View this message in context: http://www.nabble.com/validation-%2B-niceforms---missing-styles-tp14771796s27240p14949396.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Help- looking for motion/animation help (specifically, hovering)
How about an animated gif? :-) --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Jan 18, 2008, at 12:04 AM, withinreach wrote: But not the mouse hover meaning. More like levitation (grin) - think UFO 'hovering' over a house... Or more specifically, a swami/guru/magic person hovering in place with slight up/down/left/right motion. I am certain there's a loop or an interval, to keep things moving, and a 'bounding box' (don't go X pixels from center starting point) to keep things from floating away. But I just can't see the forest for the trees on how to implement it. ANY pointers would be humbly appreciated, and I PROMISE to post the final code for all to see and have (whatever you-can-have-it license along with it). Thanks Mike
[jQuery] Re: Submit a form via function call
My jquery.js does say this at this top so I take it its the latest (function(){ /* * jQuery 1.2.1 - New Wave Javascript Mike Alsup [EMAIL PROTECTED] wrote: Trust me I've tried everything. Are you using an older version of jQuery then?
[jQuery] Re: Reverse IP Lookup
StrikeIron.com has a free webservice search service (under products|utilities, you must register to access) that has a service listed which might meet your needs. -- Steve Cutter Blades Adobe Certified Professional Advanced Macromedia ColdFusion MX 7 Developer _ http://blog.cutterscrossing.com --- The Past is a Memory The Future a Dream But Today is a Gift That's why they call it The Present
[jQuery] Re: get value of checked checkboxes into a list
Updating jQuery to 1.2 gives you all the values, as you can see here: http://docs.jquery.com/Attributes/val else you can use a plugin http://www.malsup.com/jquery/form/#fields pay attention for the result, it might be an array. i haven't checked that yet. Good luck Duncan ha scritto: All, I am lost right now, still pretty green with jQuery. I have a number of checkboxes on a page input type=checkbox name=listProductID value=2 input type=checkbox name=listProductID value=3 input type=checkbox name=listProductID value=4 input type=checkbox name=listProductID value=5 and a button at the end. button name=editOptions id=editOptionsEdit /button I would like to have the value of alll checked checkboxes put into a list for use in a variable. how would I go about this? $().ready(function() { $('#editOptions').click(function(){ alert($('#listProductID').val());//returns only the first value, selected or not }); }); Thanks -- Duncan I Loxton [EMAIL PROTECTED]
[jQuery] Re: Updated to Interface 1.2 and now my Sortables don't work
Yes, you're right. Thanks for your help. I plan to move over to the newer UI as soon as I can work out how to build a portlet style sortable thing. I need a contaner/accepts style approach. Regards, Steve On Jan 18, 1:14 pm, Richard D. Worth [EMAIL PROTECTED] wrote: By the error you've described, it sounds like you're trying to use Interface with the latest major version of jQuery (1.2). The last version of jQuery with which Interface works is 1.1.4. If you haven't already, you might take a look at the jQuery UI project which is intended to replace Interface, and works with the latest version of jQuery: Web Sitehttp://ui.jquery.com/ Documentationhttp://docs.jquery.com/Ui Mailing Listhttp://groups.google.com/group/jquery-ui - Richard On Jan 18, 2008 6:54 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi all, I just upgraded from an old Interface version (I don't know what it was, but I downloaded it from the jQuery documentation website a few weeks ago) to the latest release, v1.2. Now my sortable list has stopped working properly. Each of the portlets will now only drag once. The first drag for each portlet works exactly as you'd expect, but as soon as you've initiated a drag, it won't drag again. The other portlets will drag (until you do them once too). There are no javascript errors, and if I revert to the older interface release (keeping the html exactly as shown below) the drag events work as desired. Any ideas? Thanks for your help Steve div id=columns div class=column div class=portlet pTest 1/p /div div class=portlet pTest 2/p /div div class=portlet pTest 3/p /div /div div class=column/div div class=column/div /div!-- /.columns -- $('.column').Sortable( { accept: 'portlet', helperclass: 'sort_placeholder', opacity: 0.7, tolerance: 'intersect' } );
[jQuery] Re: Selectors with this keyword
Try $(li, this) - it says look in the context of this for all li elements. -- Josh - Original Message - From: Philboi [EMAIL PROTECTED] To: jQuery (English) jquery-en@googlegroups.com Sent: Thursday, January 17, 2008 9:37 PM Subject: [jQuery] Selectors with this keyword Hi Guys, What im after is using selectors with the 'this' keyword. I imagine this is a fairly common example, but I cant seem to get the syntax right. Example: $(ul:has(li)) except i want to use something like: $(this:has(li)) Thanks
[jQuery] Re: How to validate form controls
i have 3 textboxes under div id=mydiv. i would like to validate the Textbox ie textbox is empty. i have done validation for each individual textbox by using their id,but i need coding for validate the TextBox using div id ie mydiv. The following selector would return all the textboxes inside the mydiv div: $(#mydiv textarea) -Dan
[jQuery] Re: Submit a form via function call
Trust me I've tried everything. Are you using an older version of jQuery then?
[jQuery] Re: Submit a form via function call
function dosubmit() { $(myform).submit(); } Your selector is wrong (forgot the #): function dosubmit() { $(#myform).submit(); }
[jQuery] Re: Updated to Interface 1.2 and now my Sortables don't work
By the error you've described, it sounds like you're trying to use Interface with the latest major version of jQuery (1.2). The last version of jQuery with which Interface works is 1.1.4. If you haven't already, you might take a look at the jQuery UI project which is intended to replace Interface, and works with the latest version of jQuery: Web Site http://ui.jquery.com/ Documentation http://docs.jquery.com/Ui Mailing List http://groups.google.com/group/jquery-ui - Richard On Jan 18, 2008 6:54 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi all, I just upgraded from an old Interface version (I don't know what it was, but I downloaded it from the jQuery documentation website a few weeks ago) to the latest release, v1.2. Now my sortable list has stopped working properly. Each of the portlets will now only drag once. The first drag for each portlet works exactly as you'd expect, but as soon as you've initiated a drag, it won't drag again. The other portlets will drag (until you do them once too). There are no javascript errors, and if I revert to the older interface release (keeping the html exactly as shown below) the drag events work as desired. Any ideas? Thanks for your help Steve div id=columns div class=column div class=portlet pTest 1/p /div div class=portlet pTest 2/p /div div class=portlet pTest 3/p /div /div div class=column/div div class=column/div /div!-- /.columns -- $('.column').Sortable( { accept: 'portlet', helperclass: 'sort_placeholder', opacity: 0.7, tolerance: 'intersect' } );
[jQuery] Re: jeditable question
On Jan 18, 2008, at 1:03 PM, Lionel Martelly wrote: Does anyone know why French accents will return accènt? Also if I try to reedit and save, without doing anything, it will multiply itself, over and over to the extent that a 3 letters word will strech full page width after 3 or four clicks. Only for those entries with accents. Most likely UTF-8 problem. Make sure everything (page, saving scripts etc etc) are using UTF-8. Do you have the problem page online somewhere? -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Jsquery homesite changed?
I fail to open http://www.jsquery.org/. Is there a new home site? Thanks L.
[jQuery] Re: jeditable question
can I email you a username and password? - Original Message - From: Mika Tuupola [EMAIL PROTECTED] To: jquery-en@googlegroups.com Sent: Friday, January 18, 2008 7:55 AM Subject: [jQuery] Re: jeditable question On Jan 18, 2008, at 1:03 PM, Lionel Martelly wrote: Does anyone know why French accents will return accènt? Also if I try to reedit and save, without doing anything, it will multiply itself, over and over to the extent that a 3 letters word will strech full page width after 3 or four clicks. Only for those entries with accents. Most likely UTF-8 problem. Make sure everything (page, saving scripts etc etc) are using UTF-8. Do you have the problem page online somewhere? -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: Centering Superfish menu?
Thanks for the rapid reply, Joel. I'm sorry, I did finally get it solved, but hadn't had a chance to get back to this discussion board to say that. (Classes just started here at Wake Forest University, so there was a sudden spike in my workload this week.) It actually turned out to be a fairly simple CSS-specific issue. This is probably obvious to a lot of the people on this list, but the container I was using to center the Superfish menu needed to be a set width in order for the margin-left:auto, margin-right:auto centering method to work. I don't know if there's some easy way to incorporate positioning of the Superfish menu itself within the code (or if this would be worth the trouble at all). After I realized what to do to the container to make it center, this seemed a suitable solution. I think this is more a knowledge of CSS issue and not really a deficiency of Superfish at all. Great plugin BTW! Robert On Jan 16, 7:10 pm, Joel Birch [EMAIL PROTECTED] wrote: Hi Robert, Inspecting it in Firefox I see no visual difference between JS off and JS on, maybe you fixed it? Joel BIrch.
[jQuery] Re: Help with draggable / droppable
How did you set up your droppable? A simple mistake to make is to not realise that the 'accept' parameter has to be a CSS selector. E.g. $('#myexhibitionsouter').droppable( { accept: '.draggable', activeClass: 'dropactive', hoverClass: 'drophover', ... }); For the 'accept' parameter I could have done 'input#some_id' Show us your code if you have more trouble. On 18/01/2008, Kevin Thorpe [EMAIL PROTECTED] wrote: I'm wondering if anyone would be kind enough to help me with draggable and droppable. I'm relatively inexperienced in jquery and css. What I want to do is show a list of draggable blocks (referring to the column headings in a CSV file) and to be able to sort them into a set of boxes (fields in a database table). I have a table where the cells contain a set of draggable divs and a destination table with droppable tds and this bit works fine, I get the event on dropping a div in the table cell. What I can't figure out though is how to move the div from the source table cell to the destination table cell. It simply sits where I dropped it on the page. Can anyone please enlighten me on this? thanks Kevin Thorpe -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com
[jQuery] Help with draggable / droppable
I'm wondering if anyone would be kind enough to help me with draggable and droppable. I'm relatively inexperienced in jquery and css. What I want to do is show a list of draggable blocks (referring to the column headings in a CSV file) and to be able to sort them into a set of boxes (fields in a database table). I have a table where the cells contain a set of draggable divs and a destination table with droppable tds and this bit works fine, I get the event on dropping a div in the table cell. What I can't figure out though is how to move the div from the source table cell to the destination table cell. It simply sits where I dropped it on the page. Can anyone please enlighten me on this? thanks Kevin Thorpe
[jQuery] Re: What is $.data?
More information can be found here: http://docs.jquery.com/Internals/jQuery.data Hope this helps. --John On Jan 18, 2008 11:45 AM, Adam Walters [EMAIL PROTECTED] wrote: Hello, I'm looking through and tracking the code for a jQuery autocomplete plugin (found here: http://reinh.com/2008/1/7/new-jquery-autocomplete-plugin ) I'm trying to get my JSON data to appear properly, and getting close, however, i keep coming across $.data...for example: $.data(document.body, autocompleteMode, false); Could somebody tell me what $.data is and what it's purpose is? Perhaps point me to soem resources? i can't seem to find anything. Thanks! Adam
[jQuery] Using setTimeout with a callback (callback appends function content)
I'm trying to create a simple image slideshow that is timed based on when the image is loaded. I'm having a problem when using callback functions and setTimeout. The callback function seems to append each time the function is called. I was wondering how to resolve this problem Order of events: 1. Click Play 2. Play message is shown. 3. First image switch Set message is shown 4. Play message is shown. 5. Second image switch Set message is shown twice. 6. Play message is shown. 7. Third image switch Set message is shown three times. ... etc to n Set messages. The function in question is the $.Play() function. I appreciate any guidance on what could solve the problem I am having. Code: $(document).ready(function(){ $(#first).click(function(){ $.Pause(); $.FirstImage(); return false; }); $(#prev).click(function(){ $.Pause(); $.PreviousImage(); return false; }); $(#play).click(function(){ $(#play).fadeOut(200, function(){ $(#pause).fadeIn(200, function(){ //timerT = setTimeout($.Play(),2000); $.Play(); }); }); return false; }); $(#pause).click(function(){ $.Pause(); return false; }); $(#next).click(function(){ $.Pause(); $.NextImage(); return false; }); $(#last).click(function(){ $.Pause(); $.LastImage(); return false; }); $.Initialize(); }); $.LoadImage = function(callback) { $(#imagebox).fadeOut(500, function(){ $(#ssimage).fadeOut(10, function(){ $(#loadbox).fadeIn(10, function(){ $.CalculateDimensions(); $(#imagebox).fadeIn(500, function(){ $(#ssimage).attr(src,images[count][0]); $(#imagetext).text(images[count][1]); $(#ssimage).load(function(){ $(#loadbox).fadeOut(10, function(){ $(#ssimage).fadeIn(500, function(){ if(jQuery.isFunction(callback)){ callback(); } }); }); }); }); }); }); }); } $.CalculateDimensions = function(callback) { var width = images[count][2]; var height = images[count][3]; var doc_width = $(document).width(); var doc_height = $(document).height(); $(#showbox).height(doc_height - 50); $(#showbox).width(doc_width - 50); $(#imageboxwrapper).height($(#showbox).height() - $ (#sscontrols).height()); var max_height = $(#imageboxwrapper).height() - $ (#imagetext).height() - 40; if(height max_height){ ratio = max_height/height; width = ratio * width; height = ratio * height; } $(#ssimage).css(width,Math.floor(width)); $(#ssimage).css(height,Math.floor(height)); $(#imagetext).css(width,Math.floor(width)); $(#imagebox).css(width, Math.floor(width)); $(#loadbox).css(height, Math.floor(height)); if(jQuery.isFunction(callback)){ callback(); } } $.Play = function(callback) { alert(Play); clearTimeout(timerT); $.NextImage(function(){ alert(Set); clearTimeout(timerT); timerT = setTimeout($.Play(),4000); if(jQuery.isFunction(callback)){ callback();
[jQuery] Click event calls twices
hi, i am a newbie to jQuery development. i have .click method on a class. but it calls twice. i have also used return false; and e.stopPropagation(); both are not working. i have properly check the whole document and there is only one occurance of the class. i have used the same code on simple html file and it works ok but when i used the same code for .aspx (Asp.net file) it occurs twice. any suggestion?? thnks
[jQuery] Re: jQuery for Designers
I like the concept. There are other beginner resources, but approaching jQuery from a designer's perspective is a great idea. We need to get more designers onboard. jQuery rocks for the nuts and bolts sort of programming but, unfortunately, it's still catching up on the UI stuff. You do have a typo in the right side panel, under About. It states learn now easy it is to apply web interaction using jQuery. I assume you mean how easy, unless that's some sort of clever webspeak I'm not up on. Larry On Jan 18, 10:20 am, Remy Sharp [EMAIL PROTECTED] wrote: Hi all, I recently started a new project called jQuery for Designers (http:// jqueryfordesigners.com) aimed, obviously at designers, but also subtly at jQuery beginners. It's a fortnightly tutorial aimed at different areas of web niftyness that can be done using jQuery. I guess the irony is the design of the blog (straight off the shelf)! - but ignoring that for a moment :-) I'd love to hear your feedback, suggestions or criticisms. Many thanks, Remy Sharp blog ~http://remysharp.com work ~http://leftlogic.com
[jQuery] Re: Using setTimeout with a callback (callback appends function content)
I'm not sure if my last reply went through. Here is a link to the file: http://www.cheesymovienight.com/test/slideshow/slide.php Clicking on the Play button at the bottom will start the slideshow. An alert Play is shown when the play function is called. An alert Set is shown when the callback function (which uses setTimeout) is called. On the first image each is called once, second image Play is called once and Set is called twice, and so on. Thanks again for any help. On Jan 18, 12:27 pm, Remy Sharp [EMAIL PROTECTED] wrote: Have you got a working link you can point us to? It's a little easier to debug when you've got working demo. Cheers.
[jQuery] Re: Click event calls twices
I've seen this issue a few times myself. Normally this happens to me because of the way I am calling the event, and loading it in multiple times. It would be REALLY helpful if you would post your code here. So we can take a look and let you know what might be triggering the multiple clicks. for instance, do you have the click contained within a function, and is that function being called multiple times? The same code being used in an html file makes me suspect you have an error in you asp file, as the ASP outputs plain old html, and jquery doesn't do anything until the html is recognized. If you can't figure this out, post your code and I'll see if I can spot anything. Pete
[jQuery] jQuery ninja wanted for short term contract
Hope this is an OK place to post this message... We're a new startup building an exciting web application that will change people's relationship with their city, their friends and the way they see them both. We are currently looking for a jQuery master for immediate short term contract work (that could lead to a longer term relationship). To start with, we have a clearly defined and well spec'd javascript component that we need built - something similar to a stripped down (and way cooler) version of http://simile.mit.edu/timeline/. Experience with draggables and resizeables in jQuery will be very useful. Ruby on Rails skills are a bonus, but not necessary. Good communication skills and a professional attitude are also important, as we are a geographically disperse team based in San Francisco, Vancouver and Toronto. As long as you have an internet connection and can stay on top of things, you could be located anywhere... Hit us at [EMAIL PROTECTED] for more info.
[jQuery] Design question.
I have a case that is going to prove to be processor intensive, so am looking for suggestions on how to make the code as responsive as possible. In addition, I'm a little stumped on how to resolve a problem with my IDs. I have a page that will list hundreds of people (I'm ignoring paging for now, it's just not quite suitable). For each person there will be a number of actionable items/links. Each of these links imply to do something different, but all rely on the employee ID, These links will also be embedded in sub-structures (divs/tables, etc.) So a sample of one row might look something like this: tr tdBob Smith/td tddivlink 1/div/td tdtabletrtdlink2/td/tr/table/td /tr (this is very contrived to help illustrate the design issues... :) Now the problem. If the first link (though it could be anywhere on the row) were to trigger a Cluetip with details for that employee and item, I'll need the employee ID, and supporting information (a date say, based on what column it's in). In my current code I've done this: tr td id=4Bob Smith/td tddiv id=4 class=1-Jan-2008link 1/div/td /tr Now this isn't valid HTML because the IDs are not unique. But, I need the ID to do the needed processing. I can't just ask for the first sibling's ID, because my trigger elements are embeded in other structures. The content is dynamic, so it may or may not have the same structure (it would be one of a small handful of possible structures) each time - so I can't embed the structure (i.e. .parents(tr).children(td:first) ). My reasoning here is that if I put the target ID as close as possible to the trigger element, there is less processing needed to get that ID - which is a large factor when dealing with hundreds of rows on the page. So, my question is what others are doing in this sort of situation. I've tried various techniques, including building a JS object structure with the pertinent data, but keep hitting a performance issue. Maybe I need to embed an object on each of my trigger elements that contains the needed data? Something like $(#trigger)[0].extraData = { id: 4 }; ? But won't this run into run-away memory usage when I'm dealing with potentially thousands of these triggers (multiple triggers for each employee). If it helps conceptually, think of a table with one employee per row, and each of the remaining columns being a day. Each day needing a trigger to show a Cluetip for what the employee is doing that day. I do realize my definitions are kinda simplistic, but hopefully there is enough there to get the issue across. For me to define the full picture would need a book or three... :) Thanks for any input.
[jQuery] Re: Is it possible to make a simple fading color rollover effect for text links?
Hi, thats brilliant! much better than the effort i came up with haha, thanks so much:-)
[jQuery] Re: Adding a table row and a form with jquery?
Okay, I will take a look, but I am some what determined. So I can do this to replace my first thing: $('#groups').append( 'trtd class=groupselectLoading.../td' + 'td class=roleselectLoading.../td' + 'td class=requestbuttoninput type=button value=Request onClick=makeRequest( this.form ); //td' + 'td class=cancelbuttoninput type=button value=Cancel onClick= //td' + 'td class=nothingnbsp;/td/tr', ); That seems to create the row correctly, but I also want to do a little ajaxy thing and replace the two column, groups and roles with a drop down box. Append doesn't seem to have a call back when complete. That would be big. Also, I guess the way that the code is executed, it does not seem to follow anything orderly besides chaining. So perhaps the question is how do I wait until the objects are created then populate them with by drop down boxes? By the way, thanks for the answers. cheers dn On Jan 17, 8:35 pm, Jack Killpatrick [EMAIL PROTECTED] wrote: This doesn't directly address your question, but for rendering out HTML, you might want to consider trimpath templates: http://code.google.com/p/trimpath/wiki/JavaScriptTemplates I use them for all kinds of HTML rendering. Then you can just create regular HTML instead of cobbling together DOM nodes. I usually merge my data into the template and then bind event handlers to the generated DOM nodes via jquery. It's worked nicely for a lot of projects. Anyway, a thought. I didn't carefully look at all the code below, but if the node creation for your tr is correct, you can append the row to a tbody, then append the tbody to a table and append the table to the form, I think. - Jack dougXNwrote: Anyone have an idea how one might add a row to a table and have the form elements in each column? Something like this: var newRow = document.createElement( 'tr' ); var groupCell = document.createElement( 'td' ); var roleCell= document.createElement( 'td' ); var requestCell = document.createElement( 'td' ); var cancelCell = document.createElement( 'td' ); var groupSelect = document.createElement( select ); groupSelect.setAttribute(id, 'group'); var roleSelect = document.createElement( select ); roleSelect.setAttribute(id, 'role' ); // Not sure about this, but it seems that you have to put the field // into the form then place it on the screen groupCell.appendChild( groupSelect ); roleCell.appendChild( roleSelect ); var requestButton = document.createElement( Input ); requestButton.setAttribute( 'type', 'Button' ); requestButton.setAttribute( 'value', 'Request' ); requestButton.setAttribute( 'onClick','makeRequest( this.form );'); requestCell.appendChild( requestButton ); var cancelButton = document.createElement( Input ); cancelButton.setAttribute( 'type', 'Button' ); cancelButton.setAttribute( 'value', 'Cancel' ); cancelButton.setAttribute( 'onClick','cancelRequest( this.form );'); cancelCell.appendChild( cancelButton ); newRow.appendChild( groupCell ); newRow.appendChild( roleCell ); newRow.appendChild( requestCell ); newRow.appendChild( cancelCell ); $('#groups').append( newRow ); // a little jquery action Okay this looks good, but it is not associated with the form in the DOM.? thanks dn
[jQuery] Re: jQuery for Designers
Very cool. I ended up checking out your blog site as well. A suggestion: Wherever you display code in your articles, it appears to be only a few lines of scrollable text (iframe?). I want to check out the rest of your site but its hard to look at code this way :( Looking forward to reading more :) Remy Sharp [EMAIL PROTECTED] wrote: Hi all, I recently started a new project called jQuery for Designers (http:// jqueryfordesigners.com) aimed, obviously at designers, but also subtly at jQuery beginners. It's a fortnightly tutorial aimed at different areas of web niftyness that can be done using jQuery. I guess the irony is the design of the blog (straight off the shelf)! - but ignoring that for a moment :-) I'd love to hear your feedback, suggestions or criticisms. Many thanks, Remy Sharp blog ~ http://remysharp.com work ~ http://leftlogic.com
[jQuery] Re: onClick submit using jQuery Form Plugin
The answer is here: http://groups.google.com/group/jquery-en/browse_thread/thread/e66ec974ed2c57e3/dae2b489f7aa986d
[jQuery] Re: $.post related question
You might find this useful for serializing your data and working with the dynamically created forms: http://www.malsup.com/jquery/form/#fields - Jack fluffless wrote: Hello! I'm new to jquery (and actually, js); I'm using it to cover some customer's needs and I'm finding it pretty much straightforward however I have a problem that I can solve by looking at docs.jquery or at other tutorial/examples. I'm basically using jquery to $.post stuff to a .php script. Everything works fine for the most part. I do have a problem when it comes to abstract it a bit. I use the following code: if( some_check_here ) { $.post('page.php?rand='+Math.round(Math.random()*10)+'', { action: save, fieldset: fieldset, title: title }, function(data) { $('fieldset#'+fieldset+' div.data').html(data); refresh_data(fieldset); }); } (I'm hoping identation won't be a problem..) With the above example everything works fine, I POST action=save, fieldset=value of fieldset var, title=value of title var. The problem is that I have many POST to do, and I can't always apply the function above. For example in a portion of the page I let the user to add an arbitrary number of fields (pretty much like gmail's button letting you attach an arbitrary number of files to an email). Therefore I have to use input fields named arbitraryinput[] to accomplish the task. So I'm trying to abstract this by .find()'ing input elements with .attr(type) = text. with .map() .get and .join I'm able to produce a string similar to { fieldname: value, } (I know it since I do alert() to check..) but when I use the given string in that $.post line it won't work at all (no output from the .php page). I'm pretty much sure there HAS to be a solution for this to work, but I can't find it on my own (probably due to my ignorance in this matter).. can anyone educate me, or point me to an helpful resource on this issue? :) Thanks in advance!
[jQuery] Re: Using setTimeout with a callback (callback appends function content)
Here is a link. I have changed the code around a bit since I first posted, but mainly to remove the global $( declarations. http://www.cheesymovienight.com/test/slideshow/slide.php Clicking the play button at the bottom will start the slideshow and fire the alert messages that I was talking about above. This is the first time I've tried to create a custom callback. Thanks again for the help On Jan 18, 12:27 pm, Remy Sharp [EMAIL PROTECTED] wrote: Have you got a working link you can point us to? It's a little easier to debug when you've got working demo. Cheers.
[jQuery] Re: Help with draggable / droppable
Thanks for your comments. I've just cracked it (I think). I was getting the drop event ok but couldn't work out how to move the dragged div. It was just sitting where I'd dropped it. The secret is to use a cloned helper with $('.drag').draggable({helper: 'clone'}); and then move the original draggable div using: $(.drop).droppable({ accept: .drag, tolerance: 'pointer', activeClass: 'droppable-active', hoverClass: 'droppable-hover', drop: function(ev, ui) { if (this.children.length == 0) { $(this).append(ui.draggable.element); } } }); I think my problem was that without a helper the draggable div is converted to position: absolute so that it didn't matter which table cell it was in. I just wish I knew more about the DOM.
[jQuery] Re: Jsquery homesite changed?
Not sure what jsquery.org is. Are you looking for jquery.com? --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Jan 18, 2008, at 4:03 AM, Johny wrote: I fail to open http://www.jsquery.org/. Is there a new home site? Thanks L.
[jQuery] How do I use a general error message with the Validation plugin?
Hi, I'm using the Validation plugin (http://bassistance.de/jquery-plugins/ jquery-plugin-validation/) but I'm having a little problem that's making me crazy. I've searched a lot and I've read the documentation over and over but I don't know how to do this. I've setup the plugin correctly with my form and everything is working fine, the form is validated correctly. However, for each input, there is a specific error message. I want to get rid of this error message and place a general message saying there are errors, check the highlighted boxes. I've already highlighted the boxes with erros I just don't know how to hide the error messages and display a general one. Help please!
[jQuery] Using getJSON...not successful
Hello, I am new to JQuery. I'm trying to get a JSON response back from my django view. However, I guess my data never gets loaded successfully. Does anybody know what I'm doing wrong? script $(document).ready(function(){ $(#first).click(function(){ $.getJSON(/mysite/myajax, function(data) { alert(Here); }); }); }); /script def myajax(request): a = Testimonial.objects.all()[:3] response_dict = {} response_dict.update({'a': a}) return HttpResponse(simplejson.dumps(response_dict), mimetype='application/javascript') /// Whenever I access this page and click on my div that contains the id 'first'...nothing happens. I should see an alert that says 'Here'. Any Suggestions on what I'm doing wrong? Thanks
[jQuery] Re: superfish animation issues
no prob.. you've made a great menu... thank YOU sir On Jan 17, 6:03 pm, Joel Birch [EMAIL PROTECTED] wrote: Hi Brian, Thanks so much for pointing that out. The horizontal menus were indeed not working and throwing an error. I have fixed it now. Please let me know if you still experience any issues. Thanks again Joel Birch.
[jQuery] $.post related question
Hello! I'm new to jquery (and actually, js); I'm using it to cover some customer's needs and I'm finding it pretty much straightforward however I have a problem that I can solve by looking at docs.jquery or at other tutorial/examples. I'm basically using jquery to $.post stuff to a .php script. Everything works fine for the most part. I do have a problem when it comes to abstract it a bit. I use the following code: if( some_check_here ) { $.post('page.php?rand='+Math.round(Math.random()*10)+'', { action: save, fieldset: fieldset, title: title }, function(data) { $('fieldset#'+fieldset+' div.data').html(data); refresh_data(fieldset); }); } (I'm hoping identation won't be a problem..) With the above example everything works fine, I POST action=save, fieldset=value of fieldset var, title=value of title var. The problem is that I have many POST to do, and I can't always apply the function above. For example in a portion of the page I let the user to add an arbitrary number of fields (pretty much like gmail's button letting you attach an arbitrary number of files to an email). Therefore I have to use input fields named arbitraryinput[] to accomplish the task. So I'm trying to abstract this by .find()'ing input elements with .attr(type) = text. with .map() .get and .join I'm able to produce a string similar to { fieldname: value, } (I know it since I do alert() to check..) but when I use the given string in that $.post line it won't work at all (no output from the .php page). I'm pretty much sure there HAS to be a solution for this to work, but I can't find it on my own (probably due to my ignorance in this matter).. can anyone educate me, or point me to an helpful resource on this issue? :) Thanks in advance!
[jQuery] Help with jQuery, liveQuery and/or GoogleMapsApi needed?!
Hi all. Meanwhile I can do everything with jQuery I want to do, but one thing I just can't get working and it would be awesome if someone could give me a close to solution like hint, because I tried a lot now. The google maps api has those info windows that open when you click a button. Looks something like that in code: google.maps.Event.addListener(map, click, function(overlay, latlng) { inputForm = 'input type=checkbox id=ddd /'; map.openInfoWindowHtml(latlng,inputForm); }); The infoWindows content is given as a HTML-String and I would like to bind the checkbox' click, but I just don't know how to do that. Can someone help me here??
[jQuery] Re: Using getJSON...not successful
to isolate the problem, make your script dump out something like: {a: hello} are you sure it's not a 404? is jquery being found? It could be lots of things... if you haven't already, install firebug (and use firefox). It will save you a lot of frustration. On Jan 18, 6:13 pm, gms [EMAIL PROTECTED] wrote: Hello, I am new to JQuery. I'm trying to get a JSON response back from my django view. However, I guess my data never gets loaded successfully. Does anybody know what I'm doing wrong? script $(document).ready(function(){ $(#first).click(function(){ $.getJSON(/mysite/myajax, function(data) { alert(Here); }); });}); /script def myajax(request): a = Testimonial.objects.all()[:3] response_dict = {} response_dict.update({'a': a}) return HttpResponse(simplejson.dumps(response_dict), mimetype='application/javascript') /// Whenever I access this page and click on my div that contains the id 'first'...nothing happens. I should see an alert that says 'Here'. Any Suggestions on what I'm doing wrong? Thanks
[jQuery] Re: Example of show callback for UI.Tabs?
Yeah, sometimes it's so much simplier than one makes it out to be :-) Simply starting a wrapping div as display: none and then using the .show() jQuery method on the line after the .tabs() call did the trick :-) If there's one thing i am really good at is over-complicating things, heh heh
[jQuery] Animation improvements
Hello everyone! How can i stop an animation of 1 css rule without touching everything other? For example: $('div').animate({width:'+=300'}, 'slow'); $('div').animate({opacity:'hide'}, 'slow'); $('button').click(function(){ $('div').stop('width').animate({width:'-=300'}, 'slow'); }); And maybe it's good itea to have namespaces for animation just like at events: $(#block1).animate( { width: 90%}, { queue: false, duration: 5000, namespace:'blah-blah' } ) $(#block1).stop('.blah-blah'); And can i run animation agan (after .stop())? $('div').animate({width:'+=300'}, 'slow').stop().run();
[jQuery] Re: Submit a form via function call
Trust me I've tried everything. ${#myform).submit() And $(#myform)[0].submit(); I ended up putting a hidden type=submit button on page and triggering a click on it. -- Gautam Lad -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike Alsup Sent: January 18, 2008 8:19 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Submit a form via function call function dosubmit() { $(myform).submit(); } Your selector is wrong (forgot the #): function dosubmit() { $(#myform).submit(); }
[jQuery] What is $.data?
Hello, I'm looking through and tracking the code for a jQuery autocomplete plugin (found here: http://reinh.com/2008/1/7/new-jquery-autocomplete-plugin ) I'm trying to get my JSON data to appear properly, and getting close, however, i keep coming across $.data...for example: $.data(document.body, autocompleteMode, false); Could somebody tell me what $.data is and what it's purpose is? Perhaps point me to soem resources? i can't seem to find anything. Thanks! Adam
[jQuery] Re: Jquery, Jsonp and UTF8
Sorry guys i found the problem. I had two jQuery includes : 1.2.2 and 1.1.3 inside the page :s Removing the 1.1.3 include solved the problem (i guess this is the explanation of the different behaviours i had between FF and IE).
[jQuery] jQuery for Designers
Hi all, I recently started a new project called jQuery for Designers (http:// jqueryfordesigners.com) aimed, obviously at designers, but also subtly at jQuery beginners. It's a fortnightly tutorial aimed at different areas of web niftyness that can be done using jQuery. I guess the irony is the design of the blog (straight off the shelf)! - but ignoring that for a moment :-) I'd love to hear your feedback, suggestions or criticisms. Many thanks, Remy Sharp blog ~ http://remysharp.com work ~ http://leftlogic.com
[jQuery] Re: Using setTimeout with a callback (callback appends function content)
Have you got a working link you can point us to? It's a little easier to debug when you've got working demo. Cheers.
[jQuery] Re: Design question.
A simple work around is to append a character to the id to keep them unique. But also, store the ID in the parent TR. e.g. tr id=u4 td class=empBob Smith/td tddiv class=1-Jan-2008link 1/div/td /tr Then you can get the id with $('div.1-Jan-2008').click(function() { var id = $(this).parent().parent().attr('id).substr(1); alert(do something with employee id:+id); }); would that work? On Jan 18, 7:43 pm, Shawn [EMAIL PROTECTED] wrote: I have a case that is going to prove to be processor intensive, so am looking for suggestions on how to make the code as responsive as possible. In addition, I'm a little stumped on how to resolve a problem with my IDs. I have a page that will list hundreds of people (I'm ignoring paging for now, it's just not quite suitable). For each person there will be a number of actionable items/links. Each of these links imply to do something different, but all rely on the employee ID, These links will also be embedded in sub-structures (divs/tables, etc.) So a sample of one row might look something like this: tr tdBob Smith/td tddivlink 1/div/td tdtabletrtdlink2/td/tr/table/td /tr (this is very contrived to help illustrate the design issues... :) Now the problem. If the first link (though it could be anywhere on the row) were to trigger a Cluetip with details for that employee and item, I'll need the employee ID, and supporting information (a date say, based on what column it's in). In my current code I've done this: tr td id=4Bob Smith/td tddiv id=4 class=1-Jan-2008link 1/div/td /tr Now this isn't valid HTML because the IDs are not unique. But, I need the ID to do the needed processing. I can't just ask for the first sibling's ID, because my trigger elements are embeded in other structures. The content is dynamic, so it may or may not have the same structure (it would be one of a small handful of possible structures) each time - so I can't embed the structure (i.e. .parents(tr).children(td:first) ). My reasoning here is that if I put the target ID as close as possible to the trigger element, there is less processing needed to get that ID - which is a large factor when dealing with hundreds of rows on the page. So, my question is what others are doing in this sort of situation. I've tried various techniques, including building a JS object structure with the pertinent data, but keep hitting a performance issue. Maybe I need to embed an object on each of my trigger elements that contains the needed data? Something like $(#trigger)[0].extraData = { id: 4 }; ? But won't this run into run-away memory usage when I'm dealing with potentially thousands of these triggers (multiple triggers for each employee). If it helps conceptually, think of a table with one employee per row, and each of the remaining columns being a day. Each day needing a trigger to show a Cluetip for what the employee is doing that day. I do realize my definitions are kinda simplistic, but hopefully there is enough there to get the issue across. For me to define the full picture would need a book or three... :) Thanks for any input.
[jQuery] REMOVE
REMOVE
[jQuery] Re: [Off-Topic] Reverse IP Lookup
Glen Lipka wrote on 1/17/2008 8:12 PM: I need to find a commercial company that provides a Reverse IP Lookup as a web service. So I would pass: 63.82.2.35 and it would spit back ideally: Marketo, Address, City, State, Zip etc. While an IP can give you a clue as to where the user is located, proxies can thwart this by allowing a user in one country to appear to be coming from another (anonymizers, company VPNs, etc). With that caveat, the service I've heard about the most is GeoIP: http://www.maxmind.com/app/web_services Looking at it now, it appears they offer a Proxy detector service as well. They also offer a free, less accurate service as well: http://www.maxmind.com/app/geolitecity - Bil
[jQuery] Re: jQuery for Designers
I like the idea. I think you are hitting a focus group that once exposed to jQuery would really take to it. Those peers that I have exposed jQuery to, especially those that know and understand CSS Selectors, get excited about it. Also, to me, I prefer simplistic clean layout for a blog, especially those that are going to be dealing with quite a bit of code. Keep it up. It will make another excellent resource. Allex -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Remy Sharp Sent: Friday, January 18, 2008 9:21 AM To: jQuery (English) Subject: [jQuery] jQuery for Designers Hi all, I recently started a new project called jQuery for Designers (http:// jqueryfordesigners.com) aimed, obviously at designers, but also subtly at jQuery beginners. It's a fortnightly tutorial aimed at different areas of web niftyness that can be done using jQuery. I guess the irony is the design of the blog (straight off the shelf)! - but ignoring that for a moment :-) I'd love to hear your feedback, suggestions or criticisms. Many thanks, Remy Sharp blog ~ http://remysharp.com work ~ http://leftlogic.com
[jQuery] How to make a dropdown with checkbox inside ?
Hi there, I would like to use this sort of dropdown : http://artdstract.home.pl/mav/ms/ (but with jquery). Anyone knows if a plugin exists to do that ? Couldn't find it in plugins section ! Thank you :)