[jQuery] Detect version of internet explorer using jquery
how to Detect version of internet explorer using jquery?? also name of browser?
[jQuery] Re: hoverIntent conflicts in IE browsers ( superfish fly-out )
Hi Brian, thanks for the reply. While trying to make a sample page that shows only flyout menu so that I can show you, I got more finding. Whether with v1.3.2 or v1.2.6 with hoverIntent, the flyout behaves like other browsers in all three IEs. The site that is showing issue, is a Magento site that has Prototype/ scriptaculous scripts, which the conflict has ironed out long time ago, but I am still believing it's a number of combinations that resulting this problem with hoverIntent and I need to do further testing. I can't post the site, but if you want to take a look, let me know, I will send you the url offlist. Here are the results I am seeing: jQuery v1.32 + Superfish v1.4.8 + hoverIntent, fly-out is gone in IE6. Fly-out menu cannot be revisited in IE 7 and IE8 unless a refresh has preformed. jQuery v1.2.6 + Superfish v1.4.8 + hoverIntent, fly-out cannot be revisited unless a refresh has preformed - this problem occurs in all three IEs. jQuery v1.3.2 + Superfish v1.4.8, fly-out works fine in all IEs. jQuery v1.2.6+ Superfish v1.4.8, fly-out works fine in all IEs. With above scripts combination with a sample page that shows nothing else but superfish menu, the fly-out works in all IEs. On May 26, 9:05 am, Brian Cherne br...@cherne.net wrote: Can you send me a sample of the code that breaks? Thanks, Brian. On Tue, May 26, 2009 at 2:48 AM, sutra chinesedr...@gmail.com wrote: More finding on this issue. Turns out it may not be the issue with jQuey v1.3.2 but the hoverIntent script. With hoverIntent, using v1.3.2 the flyout is gone. Using hoverIntent with v1.2.6 the flyout shows however further testing shows that, once a flyout menu has been viewed (without clicking on anything), it won't show up again unless I refresh the page, this is happening in IE6, IE7 and IE8. I removed the hoverIntent for further testing, the problem gone in all IE browsers. I then changed back to v1.3.2, everything seems to be working now. On May 25, 12:27 am, sutra chinesedr...@gmail.com wrote: I hope this post is appropriate, because this is the only way I could contact the author who wrote the script. quote: If you need help with the jQuery/JavaScript aspect of the plugin, post a message to the General jQuery Google Group with the word “Superfish” Thanks.
[jQuery] JQuery Cycle Help!
I am really someone can help (fingers crossed anyways!) I am trying to implement the cycle plugin into this page: http://staging.visualintent.com.au/cc2/index4.html It all seems to be working well in Firefox etc but not Internet Explorer 6+ and I have no idea why! Basically I am trying to have the 9 square images cycle when you rollover the specific menu item (just for the middle top square at the moment), but in IE, you will see that the middle column shows all the images in rotation... I do not wish to have the animations triggered automatically, but only rather if they mouse over the menu. Not an expert by any means, so any assistance anyone can offer would be greatly appreciated!
[jQuery] Re: tablesorter bug? How can I use tablesorter plugin to sort float?
Thanks. I've found the parser example documentation. http://tablesorter.com/docs/example-parsers.html On 5月26日, 下午12时07分, devdoer devdo...@gmail.com wrote: Thanks. Is there any demo parser example I can learn from ? I am a new beginner of JS and of cource jquery On 5月23日, 上午12时09分, aquaone aqua...@gmail.com wrote: You will need to write your own custom parser. The numeric sorter won't detect nor handle scientific notation. aquaone On Thu, May 21, 2009 at 20:22, devdoer devdo...@gmail.com wrote: HI: I foundtablesorterplugin failed to sort the float if the float is in scientific notation? Eg. thetablesorterasc sorted result of float list is : [ 7e-06,4e-05,0.051116,0.00518,0.0].- 隐藏被引用文字 - - 显示引用的文字 -- 隐藏被引用文字 - - 显示引用的文字 -
[jQuery] Re: jCarousel Question
Anyone can help me please? Thank you! On May 26, 5:46 pm, West andrei.buzdu...@gmail.com wrote: Hello. I have a question regardingjCarouselusage. I am able to configurejCarouselto display items on more than one horizontal line? For example: back 1 2 forward -- 3 4 - 4 items per section, 2 on each line. Thank you!
[jQuery] Loading google map js on a certain point of action
Hi, on my contact page, I have some hidden divs. One is for a google map. This div is only shown when the user has clicked to open the div. As I am working with smarty my template looks like this: span id=gmap {literal} script src=http://maps.google.com/maps? file=apiv=2key=ABQIp1kkS_NlSeBqN9yg50Bb9hTRRxoX5cqBbtB- sMaIPwRkCNveuxTK0oI3HaFAjNd9OtVNIVqQYPII7g type=text/javascript/ script {/literal} div id=map_canvas style=width: 518px; height: 400px;/div /span a class=plainPopup href=#gmapimg src=images/map.jpg alt=// a ... And - even the div is not shown, the google script is loading and slows down the page. Is there a way to load the script within my external jquery file, where I handle the show/hide div action? like $('.plainPopup').click(function() { load the external google file .? Any suggestions? Thanks in advance!! Bye
[jQuery] Re: Superfish with multicolumn sub navigation
Further to that last post. I have placed the contents of the Parent menu item into a div. However, superfish is adding the list items within the div. One way of solving my issue could be getting superfish to ignore certain ul buried in parent items, but how do I do this? This is the functionality I am looking for: http://hetneo.com.au/mega/ (hover over Jewellery, you'll see child categories like Ring, Necklaces, etc.. and then grandchildern of Diamonds, pearls, etc..). It seems Super will display the child categories, but is there a way of (like in the example) getting superfish to display the child and the grandchild elements? Thanks, Charles On May 27, 1:25 pm, Hetneo charles.kingsley.no...@gmail.com wrote: Hi Charlie, I guess the next question is what happens if there are li items within the div? Superfishdoes not display the grand child menu items when hovering over the parent. I.E. ul id=menu li id=5 class=item5 a href=/index.php?option=...spanParent1/span/a /li li id=2 class=mega a href=/index.php?option=...spanParent2/span/a ul div id=test class=test li id=3 class=test a href=/index.php?option=...spanChild1/ span/a ul li id=6 class=test a href=/index.php? option=...spanGrandchild1/span/a /li /ul /li /ul /li /ul I mean, how do I display the child and grand child when a user hovers over a top level parent menu item? Thanks mate (and thank you for your patience :)), Charles On May 26, 8:20 pm, Charlie charlie...@gmail.com wrote: simple recipe for multi column subs withsuperfish put div into 2nd level li. Put whatever you want inside this div, images, multiple divs, heading tags etc. Style divs any way you need use supersubs.js to adjust widths if not all sub menu's are same width Hetneo wrote:Hi Mohammad, You're exactly right. That's is the functionality of thesuperfishextension for Joomla. I found this tutorial very helpful:http://www.sitepoint.com/blogs/2009/03/31/make-a-mega-drop-down-menu-...this case however,superfish(http://users.tpg.com.au/j_birch/plugins/superfish/) is far advanced than that tutorial and I am looking to extend the functionality of the tutorial intosuperfish. Say for example you have three levels of menu menu-level-1, menu- level-2, menu-level-3. When you hover over menu-level-1, I wantsuperfishto display both menu-level-2 and menu-level-3 levels for all menu items on levels two and three. I had hoped someone had achived this to save me some time :). Any ideas? Many thanks, Charles On May 26, 5:16 pm, Mohd.Tareqtareq.m...@gmail.comwrote:Hi Hetneo, Its easy to get that kind of menu using javascript / jquery code. See they have written plugin based on ul li. Now here is a solution like Ischa I guess ;) Step : 1 - Create Main menu div menu1,menu2,menu3,etc 2 - Create another menu below each menu div [menu1 - sub-menu1] 3 - Use 'hover' function of jquery or 'onmouseover / onmouseout' of javascript 3 - Within 'hover' or 'onmouseover/onmouseout' function you need to hide / unhide your divs 4 - Use any function like fadeIn,fadeOut,slideUp,slideUp to toggle your menu. Or you can do it via css like twitter people did. cheers, On Tue, May 26, 2009 at 12:15 PM, Ischa Gastcont...@ischagast.nlwrote:That's great news. Would be interested to see the final product.Are there any hints you can give me or point me to a file I can be focusing my attention to achive this?It's a custom made script where you can choose what child you want to target, somethingsuperfishdoesn't have but would be very welcome.---| Regard |--- Mohammad.Tareque
[jQuery] Re: Menu slideUp is very erratic
I've had to revisit this code, as the following error is generated in IE when hovering over the menus that have dropdowns: Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.5.21022; InfoPath.2; .NET CLR 3.0.30618; .NET CLR 3.5.30729; .NET CLR 1.1.4322; OfficeLiveConnector.1.3; OfficeLivePatch.0.0) Timestamp: Wed, 27 May 2009 09:11:10 UTC Message: Invalid argument. Line: 19 Char: 35190 Code: 0 URI: http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js I don't imagine for one minute that this is a problem with Google's hosted jQuery file, despite what the error says, but I don't know what's going on with it. This doesn't happen in Firefox, just IE. I could really do with getting this fixed, so any help would be great. Thanks in advance.
[jQuery] Re: Make textbox visible if checkbox is selected
untested: input id=myText name=myText type=text / $('#myText').hide(); // on default, hide textbox $('#myCheckbox').click(function(){ var checked_status = this.checked; if(checked_status == true) { $('#myText').show(); } }); On 27 Mai, 11:30, ciupaz luigi.zambe...@gmail.com wrote: Hi all, having a simple textbox: input id=myText name=myText type=text visible=false / and a checkbox: input name=myCheckbox id=myCheckbox type=checkbox / how can I make the textbox visible if the user select the checkbox? Thanks in advance. Luis
[jQuery] Re: Make textbox visible if checkbox is selected
Perfect, thank you heohni. L
[jQuery] Re: Superfish with multicolumn sub navigation
superfish doesn't add items, it only animates them *if* they exist did you look at the working example i shared with you? Using superfish it shows several methods to do what you need without using ul's in the div if you are stuck on using ul's inside the div then you would need to do some custom scripting Hetneo wrote: Further to that last post. I have placed the contents of the Parent menu item into a div. However, superfish is adding the list items within the div. One way of solving my issue could be getting superfish to ignore certain ul buried in parent items, but how do I do this? This is the functionality I am looking for: http://hetneo.com.au/mega/ (hover over "Jewellery", you'll see child categories like Ring, Necklaces, etc.. and then grandchildern of Diamonds, pearls, etc..). It seems Super will display the child categories, but is there a way of (like in the example) getting superfish to display the child and the grandchild elements? Thanks, Charles On May 27, 1:25pm, Hetneo charles.kingsley.no...@gmail.com wrote: Hi Charlie, I guess the next question is what happens if there are li items within the div? Superfishdoes not display the grand child menu items when hovering over the parent. I.E. ul id="menu" li id="5" class="item5" a href=""spanParent1/span/a /li li id="2" class="mega" a href=""spanParent2/span/a ul div id="test" class="test" li id="3" class="test" a href=""spanChild1/ span/a ul li id="6" class="test" a href=""spanGrandchild1/span/a /li /ul /li /ul /li /ul I mean, how do I display the child and grand child when a user hovers over a top level parent menu item? Thanks mate (and thank you for your patience :)), Charles On May 26, 8:20pm, Charlie charlie...@gmail.com wrote: simple recipe for multi column subs withsuperfish put div into 2nd level li. Put whatever you want inside this div, images, multiple divs, heading tags etc. Style divs any way you need use supersubs.js to adjust widths if not all sub menu's are same width Hetneo wrote:Hi Mohammad, You're exactly right. That's is the functionality of thesuperfishextension for Joomla. I found this tutorial very helpful:http://www.sitepoint.com/blogs/2009/03/31/make-a-mega-drop-down-menu-...this case however,superfish(http://users.tpg.com.au/j_birch/plugins/superfish/) is far advanced than that tutorial and I am looking to extend the functionality of the tutorial intosuperfish. Say for example you have three levels of menu menu-level-1, menu- level-2, menu-level-3. When you hover over menu-level-1, I wantsuperfishto display both menu-level-2 and menu-level-3 levels for all menu items on levels two and three. I had hoped someone had achived this to save me some time :). Any ideas? Many thanks, Charles On May 26, 5:16pm, "Mohd.Ta req"tareq.m...@gmail.comwrote:Hi Hetneo, Its easy to get that kind of menu using _javascript_ / jquery code. See they have written plugin based on ul li. Now here is a solution like Ischa I guess ;) Step : 1 - Create Main menu div menu1,menu2,menu3,etc 2 - Create another menu below each menu div [menu1 - sub-menu1] 3 - Use 'hover' function of jquery or 'onmouseover / onmouseout' of _javascript_ 3 - Within 'hover' or 'onmouseover/onmouseout' function you need to hide / unhide your divs 4 - Use any function like fadeIn,fadeOut,slideUp,slideUp to toggle your menu. Or you can do it via css like twitter people did. cheers, On Tue, May 26, 2009 at 12:15 PM, Ischa Gastcont...@ischagast.nlwrote:That's great news. Would be interested to see the final product.Are there any hints you can give me or point me to a file I can be focusing my attention to achive this?It's a custom made script where you can choose what child you want to target, somethingsuperfishdoesn't have but would be very welcome.---| Regard |--- Mohammad.Tareque
[jQuery] Re: Loading google map js on a certain point of action
$.getScript("url") might help heohni wrote: Hi, on my contact page, I have some hidden divs. One is for a google map. This div is only shown when the user has clicked to open the div. As I am working with smarty my template looks like this: span id="gmap" {literal} script src="" class="moz-txt-link-rfc2396E" href="http://maps.google.com/maps?file=api=2=ABQIp1kkS_NlSeBqN9yg50Bb9hTRRxoX5cqBbtB-sMaIPwRkCNveuxTK0oI3HaFAjNd9OtVNIVqQYPII7g">"http://maps.google.com/maps? file=apiv=2key=ABQIp1kkS_NlSeBqN9yg50Bb9hTRRxoX5cqBbtB- sMaIPwRkCNveuxTK0oI3HaFAjNd9OtVNIVqQYPII7g" type="text/_javascript_"/ script {/literal} div id="map_canvas" style="width: 518px; height: 400px;"/div /span a class="plainPopup" href=""img src="" alt=""// a ... And - even the div is not shown, the google script is loading and slows down the page. Is there a way to load the script within my external jquery file, where I handle the show/hide div action? like $('.plainPopup').click(function() { load the external google file .? Any suggestions? Thanks in advance!! Bye
[jQuery] Re: Loading google map js on a certain point of action
I made now this: if(item == #gmap){ $.getScript(http://maps.google.com/maps? file=apiv=2key=ABQIp1kkS_NlSeBqN9yg50Bb9hTRRxoX5cqBbtB- sMaIPwRkCNveuxTK0oI3HaFAjNd9OtVNIVqQYPII7g, function(){ alert(Script loaded and executed.); setTimeout(initialize, 3000); function initialize() { if (GBrowserIsCompatible()) { var map = new GMap2(document.getElementById(map_canvas)); var lippetal = new GLatLng(51.6400656,8.0973679); var text = bdas consulting team GmbH/bbr /Hultroper Straße 40abrD-59510 Lippetalbr /br /a href='http:// maps.google.de/maps? f=dsource=s_dhl=degeocode=saddr=daddr=Hultroper+Stra%C3%9Fe+40a, +59510+Lippetal,(das+consulting+team+GmbH) sll=51.151786,10.415039sspn=26.409941,67.675781ie=UTF8ll=51.737812,8.081428spn=0.405655,1.057434z=11' target='_blank'uRoutenplaner/u/a; map.setCenter(lippetal, 9); map.addControl(new GSmallMapControl()); map.addControl(new GMapTypeControl()); var marker = new GMarker(lippetal); map.addOverlay(marker); marker.openInfoWindowHtml(text); } } initialize(); }); } And the following happens: I get the message Script loaded. But as error in IE: GMap2 not definded and in FF GBrowserIsCompatible is not defined What I do wrong? Please help! Thanks! On 27 Mai, 12:22, Charlie charlie...@gmail.com wrote: $.getScript(url) might help
[jQuery] Re: Superfish with multicolumn sub navigation
Hehe.. I was afraid you were going to say that. jQuery is my strongest point (as you have probably already guessed) and I am running out of time. BUT I will definitely donate to your wonderful project if you could help me with this custom scripting (hehe.. desperation + desire to use superfish :))! Thoughts :) ? Thanks, Charles On May 27, 8:05 pm, Charlie charlie...@gmail.com wrote: superfishdoesn't add items, it only animates them *if* they exist did you look at the working example i shared with you? Usingsuperfishit shows several methods to do what you need without using ul's in the div if you are stuck on using ul's inside the div then you would need to do some custom scripting Hetneo wrote:Further to that last post. I have placed the contents of the Parent menu item into a div. However,superfishis adding the list items within the div. One way of solving my issue could be gettingsuperfishto ignore certain ul buried in parent items, but how do I do this? This is the functionality I am looking for:http://hetneo.com.au/mega/(hover over Jewellery, you'll see child categories like Ring, Necklaces, etc.. and then grandchildern of Diamonds, pearls, etc..). It seems Super will display the child categories, but is there a way of (like in the example) gettingsuperfishto display the child and the grandchild elements? Thanks, Charles On May 27, 1:25 pm, Hetneocharles.kingsley.no...@gmail.comwrote:Hi Charlie, I guess the next question is what happens if there are li items within the div? Superfishdoes not display the grand child menu items when hovering over the parent. I.E. ul id=menu li id=5 class=item5 a href=/index.php?option=...spanParent1/span/a /li li id=2 class=mega a href=/index.php?option=...spanParent2/span/a ul div id=test class=test li id=3 class=test a href=/index.php?option=...spanChild1/ span/a ul li id=6 class=test a href=/index.php? option=...spanGrandchild1/span/a /li /ul /li /ul /li /ul I mean, how do I display the child and grand child when a user hovers over a top level parent menu item? Thanks mate (and thank you for your patience :)), Charles On May 26, 8:20 pm, Charliecharlie...@gmail.comwrote:simple recipe for multi column subs withsuperfish put div into 2nd level li. Put whatever you want inside this div, images, multiple divs, heading tags etc. Style divs any way you need use supersubs.js to adjust widths if not all sub menu's are same width Hetneo wrote:Hi Mohammad, You're exactly right. That's is the functionality of thesuperfishextension for Joomla. I found this tutorial very helpful:http://www.sitepoint.com/blogs/2009/03/31/make-a-mega-drop-down-menu-...thiscase however,superfish(http://users.tpg.com.au/j_birch/plugins/superfish/) is far advanced than that tutorial and I am looking to extend the functionality of the tutorial intosuperfish. Say for example you have three levels of menu menu-level-1, menu- level-2, menu-level-3. When you hover over menu-level-1, I wantsuperfishto display both menu-level-2 and menu-level-3 levels for all menu items on levels two and three. I had hoped someone had achived this to save me some time :). Any ideas? Many thanks, Charles On May 26, 5:16 pm, Mohd.Ta reqtareq.m...@gmail.comwrote:Hi Hetneo, Its easy to get that kind of menu using javascript / jquery code. See they have written plugin based on ul li. Now here is a solution like Ischa I guess ;) Step : 1 - Create Main menu div menu1,menu2,menu3,etc 2 - Create another menu below each menu div [menu1 - sub-menu1] 3 - Use 'hover' function of jquery or 'onmouseover / onmouseout' of javascript 3 - Within 'hover' or 'onmouseover/onmouseout' function you need to hide / unhide your divs 4 - Use any function like fadeIn,fadeOut,slideUp,slideUp to toggle your menu. Or you can do it via css like twitter people did. cheers, On Tue, May 26, 2009 at 12:15 PM, Ischa Gastcont...@ischagast.nlwrote:That's great news. Would be interested to see the final product.Are there any hints you can give me or point me to a file I can be focusing my attention to achive this?It's a custom made script where you can choose what child you want to target, somethingsuperfishdoesn't have but would be very welcome.---| Regard |--- Mohammad.Tareque
[jQuery] Re: Loading google map js on a certain point of action
This was helping and solving my problem: http://groups.google.com/group/Google-Maps-API/browse_thread/thread/8863f57e0904a221/3f1577e7abed928b On 27 Mai, 12:22, Charlie charlie...@gmail.com wrote: $.getScript(url) might help heohni wrote:Hi, on my contact page, I have some hidden divs. One is for a google map. This div is only shown when the user has clicked to open the div. As I am working with smarty my template looks like this: span id=gmap {literal} script src=http://maps.google.com/maps? file=apiv=2key=ABQIp1kkS_NlSeBqN9yg50Bb9hTRRxoX5cqBbtB- sMaIPwRkCNveuxTK0oI3HaFAjNd9OtVNIVqQYPII7gtype=text/javascript/ script {/literal} div id=map_canvas style=width: 518px; height: 400px;/div /span a class=plainPopup href=#gmapimg src=images/map.jpg alt=// a ... And - even the div is not shown, the google script is loading and slows down the page. Is there a way to load the script within my external jquery file, where I handle the show/hide div action? like $('.plainPopup').click(function() { load the external google file .? Any suggestions? Thanks in advance!! Bye
[jQuery] Re: jQuery barcode
hi, I just found this discussion when I posted my own version last week (I found no existent when I started my plugin and the time to start a website you had posted yours) Anyway, I have a version that handles barcode : ean 8, ean 13, 2 of 5 standard (or industrial) and interleaved, code 11, code 39, code 93, code 128 and msi Your version create an inline image, which mine doesn't, it is an interesting feature, i create mine in CSS, i think i'll have a look on it to integrate it too Do you want to join me to managed other barcode type ? Available here : http://barcode-coder.com/en/barcode-jquery-plugin-201.html jb.
[jQuery] THeory: dealing with really big data sets
Hello, I was hoping someone can help me with this problem . I wanted to create a site like www.kayak.com only for a different industry the concept being the filtering process. I understand using json and jquery. However i am wondering if anyone had any idea if json would be a good idea to go with for really big data sets for example a search resulted in 5000-10 records. Would the json file very big ( assuming that each row had probably 2000 character) my main concern being initial loadup speed. Would a ajax method be preferred that lets say out of 1 records we load initially 1000 records and then when we reach 950 we load another 1000 records ? Anyone dealt with showing really large data sets using json jquery ? any help is appreciated. thanks andy
[jQuery] logging panel?
Hi Is there any logging panel plugins that i can use? Similar to YUI's? Thanks
[jQuery] how to use stop() properly
Hi! I have a little problem. On this page: http://www.arvag.net/test/jquery/bug/ simple box that fadeIn and fadeOut on hover event. I fixed queue problem with .stop({clearQueue:true}) but now i have some other problem. Here it will fade over the course of 2 sec. If you move your mouse away from object while it is fadeing text in the selector is staying transparent. If you move in and move out your mouse away from the object really fast, on next hover text wont be visible anymore... How can i fix this? I tryed putting gotoEnd on true and giving stop() method callback function of $(this).show/hide(); and it seems it works, but it is still a bit buggy... So, any solutions? Thnx!
[jQuery] Hiding a cfoutput until clicked
Hi There i want to hide my phone numbers in an output page so that the viewer has to click an icon to see it. i have the following jquery so far: !---JQuery test to hide phone--- script type=text/javascript src=jquery.js/script script type=text/javascript $(document).ready(function() { $(contains:('freelist.busphone'),this).hide(); }); and this is the code with the phone number i want to hide: cfloop query=freelist startrow=#URL.offset# endrow=#limit# cfoutput tr bgcolor=###iif(currentrow MOD 2,DE('ebebeb'),DE ('ff'))# class=smalltext11light td width=81%nbsp;#freelist.busname# /td td width=19% align=rightnbsp;#freelist.busphone#/ td /tr /cfoutput /cfloop Just how do i reference that #freelist.busphone# in the 2nd line of my jquery please cheers and thanks in advance Grabit
[jQuery] Re: performance of html(val)
Try append or appendTo. http://docs.jquery.com/Manipulation/append http://docs.jquery.com/Manipulation/appendTo On May 27, 5:29 am, jonathan topcod...@gmail.com wrote: I am constructing a large table on the fly and add it to the dom using html(val). It takes about 6 seconds. I am wondering if there's any practice that would speed up this process? thanks!
[jQuery] Event behaving
Hi, I have a question why is this not working: $(button).keypress(function(e) { e.preventDefault(); alert(hello); }); but this here: $(button).click(function(e) { e.preventDefault(); alert(hello); }); For my understanding when I hit enter in a form keypress should work?! thx TC
[jQuery] Need help optimizing/analyzing jquery / json
Hello Guys, I have created a site using jquery www.arc-max.com/cruisesearch/ the problem lies in the initial loading of the result page (the front page is a bit slow but that I can optimize that on my own) . I am using json to store the result set. The json file can get a bit bloated up anywhere between 200-400kb depending on the number of results . After optimizing the graphics and using gzip I have been able to reduce the load time to around 20 seconds depending on the number of results (this based on a first time load). Since i am not that good at optimizing i wanted to know ... a) Can the jquery code or the json data be optimized further? is it a badly written code ? I know this is very subjective but i am sure there are things that could be done that i have no clue about ...so would like to show it to you guys who have had some experience in analyzing codes. b) is this possible and how ? to load two json object one with say 20 results the other with all the results including the first 20. Initially the first json object gets loaded (small file faster download hence faster loading of page) while the bigger file gets loaded in the background and once the user starts using the filter the data gets pulled in from the complete result file (the bigger file). Thanks for our help andy
[jQuery] jQuery.post - PHP script - redirect
Hi All, I have following problem: I would like to post (jQuery.post) login-form variables to the PHP script (backend.php) for validation and if it is succesfull then redirect to myaccount.php. Here is my code: script type=text/javascript $(document).ready(function() { $(#submit_butt).click( function() { // configurations for the buzzing effect. Be careful not to make it too annoying! var conf = { frequency: 5000, spread: 5, duration: 600 }; /* do your AJAX call and processing here... */ var unameval = $(#username).val(); var pwdval = $(#pwd).val(); //alert(unameval+pwordval); $.post(backend.php, { username: unameval, pwd: pwdval }, function (data){ if(data.length 0) { window.location.href(account.php); } }); // this is the call we make when the AJAX callback function indicates a login failure $(#login).vibrate(conf); // let's also display a notification if($(#errormsg).text() == ) $(#loginform).append('p id=errormsgNesprávne meno alebo heslo! /p'); // clear the fields to discourage brute forcing :) $(#username).val(); $(#pwd).val(); }); }); /script Can you help me? Any suggestions??? Thank you very much for your response Best, Marian
[jQuery] jQuery.post - PHP script - redirect
Hi All, I am looking for the solution of this problem: i have a login form. i would like to shake the login-form box, if the authentication (PHP+MySQL) failed. i use jQuery.post for posting the values from login form to the PHP- script (used for validation - named backend.php). This is the code: script type=text/javascript $(document).ready(function() { $(#submit_butt).click( function() { // configurations for the buzzing effect. Be careful not to make it too annoying! var conf = { frequency: 5000, spread: 5, duration: 600 }; /* do your AJAX call and processing here... */ var unameval = $(#username).val(); var pwdval = $(#pwd).val(); $.post(backend.php, { username: unameval, pwd: pwdval }, function(data){ if(data.length 0) { window.location.href(account.php); } }); // this is the call we make when the AJAX callback function indicates a login failure $(#login).vibrate(conf); // let's also display a notification if($(#errormsg).text() == ) $(#loginform).append('p id=errormsgNesprávne meno alebo heslo! /p'); // clear the fields to discourage brute forcing :) $(#username).val(); $(#pwd).val(); }); }); /script Could you pls help me? Any suggestions? Thanks a lot. Best, Marian
[jQuery] [validate] other language for messages
Hi, I need to localize my validation plugin in general. Hence I thought I have to override the default code with this one: - //further language validation $(.myForm).validate({ messages: { required: Other language text. } }); But it's not working. Another problem is, that I can't access input names like this name=xyz[1] Is there a workaround as the brackets seem to be the problem? thx TC
[jQuery] Re: Where to find a proper slide effect?
I am really tired now, so cant think this all the way through but the idea is to animate at the same time outer div by its height and inner by its top value so you get that effect. Something like this maybe: aclick for slide/a div div lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum /div /div div lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum /div On May 26, 8:49 pm, M.M. mario.maru...@gmail.com wrote: On May 26, 8:32 pm, tain bugi@gmail.com wrote: they only have different easing value..otherwise they are identical. No they're not! Are we looking at the same page? The effect you get when you click Slide Out or Slide In onhttp://docs.jquery.com/Tutorials:Live_Examples_of_jQueryis NOT the slide effect I want. It's not even similar to scriptaculous effect in my example, because the text doesn't go with the slide, it just stays in place and gets revealed (it's normal jQuery 'slide' effect, in jQuery UI it's called 'blind') Please, people, don't post answers like this, someone who actually knows the answer might think it's already answered.
[jQuery] Re: [validate] other language for messages
The default messages are defined in $.validator.messages, and you can overwrite those. Take a look at the existing localizations, eg. http://jqueryjs.googlecode.com/svn/trunk/plugins/validate/localization/messages_es.js The bracket issue is documented here: http://docs.jquery.com/Plugins/Validation/Reference#Fields_with_complex_names_.28brackets.2C_dots.29 Jörn On Wed, May 27, 2009 at 7:52 AM, elischer.flor...@googlemail.com elischer.flor...@googlemail.com wrote: Hi, I need to localize my validation plugin in general. Hence I thought I have to override the default code with this one: - //further language validation $(.myForm).validate({ messages: { required: Other language text. } }); But it's not working. Another problem is, that I can't access input names like this name=xyz[1] Is there a workaround as the brackets seem to be the problem? thx TC
[jQuery] Validate between textboxes
Hi all, having 3 textboxes, how can I validate to make one of them required if the other two are not compiled by the user? Thanks in advance. Luis
[jQuery] find reverse
Hi jQuery Group, is it possible find a node backwards instead of forwards. i.e. div id=test0 div id=findme / div now I would like to do (remember find_reverse does not exist) $(#findme).find_reverse(#test0); is there any method to do a find_reverse??? regards, Peter Wraae Marino -- Power Tumbling - http://www.powertumbling.dk OSG-Help - http://osghelp.com
[jQuery] Re: Need help optimizing/analyzing jquery / json
I didn't look too closely at the files, but I suggest separating your data from the executing code. Use JSON to create a series of data objects and use a different script to run through those objects and build your page based on search criteria, etc. From what I saw in cruise_json.js, there's a lot of repeated if statements and variables. I have a feeling it would be easy to reduce that code. I could be missing the actual data file.. Also, it would be very helpful for troubleshooting if the demo you provided would have properly formatted code so that it would be easier to read. That's the main reason I didn't look too carefully. On May 27, 2:01 am, andymott a...@arc-max.com wrote: Hello Guys, I have created a site using jquerywww.arc-max.com/cruisesearch/the problem lies in the initial loading of the result page (the front page is a bit slow but that I can optimize that on my own) . I am using json to store the result set. The json file can get a bit bloated up anywhere between 200-400kb depending on the number of results . After optimizing the graphics and using gzip I have been able to reduce the load time to around 20 seconds depending on the number of results (this based on a first time load). Since i am not that good at optimizing i wanted to know ... a) Can the jquery code or the json data be optimized further? is it a badly written code ? I know this is very subjective but i am sure there are things that could be done that i have no clue about ...so would like to show it to you guys who have had some experience in analyzing codes. b) is this possible and how ? to load two json object one with say 20 results the other with all the results including the first 20. Initially the first json object gets loaded (small file faster download hence faster loading of page) while the bigger file gets loaded in the background and once the user starts using the filter the data gets pulled in from the complete result file (the bigger file). Thanks for our help andy
[jQuery] Re: find reverse
Do you want to use parent? $(#findme).parent() http://docs.jquery.com/Traversing/parent#expr On Wed, May 27, 2009 at 9:19 AM, Peter Marino marino.pe...@gmail.comwrote: Hi jQuery Group, is it possible find a node backwards instead of forwards. i.e. div id=test0 div id=findme / div now I would like to do (remember find_reverse does not exist) $(#findme).find_reverse(#test0); is there any method to do a find_reverse??? regards, Peter Wraae Marino -- Power Tumbling - http://www.powertumbling.dk OSG-Help - http://osghelp.com
[jQuery] Re: Where to find a proper slide effect?
Thanks Gavra, I just needed the idea :) I added the wrapper animation and it works fine now. For those guys who asked it before, I made 'myslide' effect based on UI 'slide', and it's on http://sklupc.com/slide2 (it works only up/ down for now)
[jQuery] Re: find reverse
Hi Caires, something like that but it should continue up the parent until it finds it or return null peter On Wed, May 27, 2009 at 2:21 PM, Caires Vinicius caire...@gmail.com wrote: Do you want to use parent? $(#findme).parent() http://docs.jquery.com/Traversing/parent#expr On Wed, May 27, 2009 at 9:19 AM, Peter Marino marino.pe...@gmail.comwrote: Hi jQuery Group, is it possible find a node backwards instead of forwards. i.e. div id=test0 div id=findme / div now I would like to do (remember find_reverse does not exist) $(#findme).find_reverse(#test0); is there any method to do a find_reverse??? regards, Peter Wraae Marino -- Power Tumbling - http://www.powertumbling.dk OSG-Help - http://osghelp.com -- Power Tumbling - http://www.powertumbling.dk OSG-Help - http://osghelp.com
[jQuery] Making a button in active
Good Afternoon (or morning depending on where you are). I really hate posting probably quite simple questions to forums, but this is really foxing me. $(.btn).click(function(){ //.btn is now NOT clickable $(#somethingElse).doStuff(slow, function(){ //.btn is now clickable }); } I've got a long navigation, and pages slide in and out of view. Troubles are, if the user impaitently clicks a load of links while the page loading and sliding in is happening, it melts my (probably poorly written) code. So, I'm trying to stop the user from clicking on any other buttons, while the page loader is doing it's thing.
[jQuery] Validate textbox on particulare selected combo value
Hi all, I have a select (combobox) like this: select name=role id=role option value=AdminADMIN/option option value=UserUser/option option value=Other id=OtherOTHER (specify)/option /select and a textbox like: input name=txtOther id=txtOther type=text / I'd like to validate the textbox if the selected choice is 'Other'. I'm trying this code: $(document).ready(function() { $('#txtOther').hide(); $('#role').change(function() { var itemValue = $(this).val(); //alert('ItemValue: ' + itemValue); if (itemValue == 'Other') { //alert('True'); $('#txtOther').show(); } else { //alert('False'); $('#txtOther').hide(); $('#txtOther').validate(false); } }); }); $(document).ready(function() { $(form#myform).validate({ rules: { role: { required: true }, other: { required: true } }, messages: { ruolo: { required: span style='color:#ff;'*/span }, altro: { required: span style='color:#ff;'Specify \'Other\'/span } } }); }); but does not work, because the validation error message (Specify 'Other') always appears. Has anyone ideas? Thanks Luis
[jQuery] Re: Making a button in active
Sorry, I should probably add, it's not actually a button. It's an a href=whatever.php class=btn On May 27, 2:05 pm, Fluffica thomas.james.winstan...@googlemail.com wrote: Good Afternoon (or morning depending on where you are). I really hate posting probably quite simple questions to forums, but this is really foxing me. $(.btn).click(function(){ //.btn is now NOT clickable $(#somethingElse).doStuff(slow, function(){ //.btn is now clickable }); } I've got a long navigation, and pages slide in and out of view. Troubles are, if the user impaitently clicks a load of links while the page loading and sliding in is happening, it melts my (probably poorly written) code. So, I'm trying to stop the user from clicking on any other buttons, while the page loader is doing it's thing.
[jQuery] Re: does selectors $ cache?
No, it does not cache. Each time you make a page query, a new call is made. For better performance, always cache commonly used selectors: $myID = $('#myID'); // $ used for initial var to indicate a jQuery object var text = $myID.text(); var color = $myID.css('color'); Also, you should always use the raw ID reference where possible as it's far more performant than tacking on a tag name first: $myID = $('#myID'); // this performs better than the line below $myID = $('div#myID'); // avoid this where possible, performance will degrade andy -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of jonathan Sent: Wednesday, May 27, 2009 12:44 AM To: jQuery (English) Subject: [jQuery] does selectors $ cache? does selectors cache? for example, if I do $('#myid') twice, does it search through the document twice for myid?
[jQuery] Re: Event behaving
Most likely because the button element doesn't recognize the keypress event. Not every element have the same events. Swap out button for input and try it again, it should work just fine. -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of elischer.flor...@googlemail.com Sent: Wednesday, May 27, 2009 2:29 AM To: jQuery (English) Subject: [jQuery] Event behaving Hi, I have a question why is this not working: $(button).keypress(function(e) { e.preventDefault(); alert(hello); }); but this here: $(button).click(function(e) { e.preventDefault(); alert(hello); }); For my understanding when I hit enter in a form keypress should work?! thx TC
[jQuery] Re: find reverse
One thing to remember Peter is that jQuery returns an array. You could do a more comprehensive search, then reverse the returned value. Something like this might work: var $myDivs = $('div').reverse; then search through $myDivs for your preferred value. andy _ From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Peter Marino Sent: Wednesday, May 27, 2009 7:20 AM To: jquery-en@googlegroups.com Subject: [jQuery] find reverse Hi jQuery Group, is it possible find a node backwards instead of forwards. i.e. div id=test0 div id=findme / div now I would like to do (remember find_reverse does not exist) $(#findme).find_reverse(#test0); is there any method to do a find_reverse??? regards, Peter Wraae Marino -- Power Tumbling - http://www.powertumbling.dk OSG-Help - http://osghelp.com
[jQuery] Re: find reverse
On May 27, 2:19 pm, Peter Marino marino.pe...@gmail.com wrote: Hi jQuery Group, is it possible find a node backwards instead of forwards. isn't that parents()? (not parent, parents :) http://docs.jquery.com/Traversing/parents
[jQuery] [validate] Which one do I need to put? Very simple question.
I could not find any document about this. In js script, are firstname, flasname etc from id or name in the html? For example in js var validator = $(#signupform).validate({ rules: { firstname: required, lastname: required, username: { required: true, And in a html, td class=labellabel id=lfirstname for=firstnameFirst Name/ label/td td class=fieldinput id=firstname name=firstname type=text value= maxlength=100 //td td class=status/td Where does firstname and lastname in rules come from? Are they from id or name in input or label.
[jQuery] Re: find reverse
hi, did not see the parents() method before now.. it does look this is what I need.. will check when I get home from work... thanks peter On Wed, May 27, 2009 at 4:49 PM, M.M. mario.maru...@gmail.com wrote: On May 27, 2:19 pm, Peter Marino marino.pe...@gmail.com wrote: Hi jQuery Group, is it possible find a node backwards instead of forwards. isn't that parents()? (not parent, parents :) http://docs.jquery.com/Traversing/parents -- Power Tumbling - http://www.powertumbling.dk OSG-Help - http://osghelp.com
[jQuery] Re: Making a button in active
You can use timeout method, or maybe changing href attribute to href= $(.btn).click(function(){ var oriHref = $(this).attr('href'); //.btn is now NOT clickable $(this).attr('href' : ''); $(#somethingElse).doStuff(slow, function(){ //.btn is now clickable $('.btn').attr('href' : 'oriHref'); }); } On May 27, 3:05 pm, Fluffica thomas.james.winstan...@googlemail.com wrote: Good Afternoon (or morning depending on where you are). I really hate posting probably quite simple questions to forums, but this is really foxing me. $(.btn).click(function(){ //.btn is now NOT clickable $(#somethingElse).doStuff(slow, function(){ //.btn is now clickable }); } I've got a long navigation, and pages slide in and out of view. Troubles are, if the user impaitently clicks a load of links while the page loading and sliding in is happening, it melts my (probably poorly written) code. So, I'm trying to stop the user from clicking on any other buttons, while the page loader is doing it's thing.
[jQuery] Re: [validate] Which one do I need to put? Very simple question.
They always refer to the name-attribute! Jörn On Wed, May 27, 2009 at 4:56 PM, elvisparsley okada.s...@gmail.com wrote: I could not find any document about this. In js script, are firstname, flasname etc from id or name in the html? For example in js var validator = $(#signupform).validate({ rules: { firstname: required, lastname: required, username: { required: true, And in a html, td class=labellabel id=lfirstname for=firstnameFirst Name/ label/td td class=fieldinput id=firstname name=firstname type=text value= maxlength=100 //td td class=status/td Where does firstname and lastname in rules come from? Are they from id or name in input or label.
[jQuery] Reuse ajax calls
Hi ! Is there a way to store ajax calls in variables and reuse them later ? I saw that $.ajax is returning the XHR object, maybe it could be a lead ? For example, I would like to do : [code] var SClass = { oSavedAjaxRequest: null, doMyRequest: function() { if (SClass.oSavedAjaxRequest) $.ajax(SClass.oSavedAjaxRequest); else SClass.oSavedAjaxRequest = $.ajax({url: 'test.php', type: 'POST', data: {}}); } } [/code] Thank you !
[jQuery] Re: Making a button in active
I thought oriHref was a fancy part of jQuery there. Well, hopefull thinking. Unfortunatly I've got a long list of dynamic links, and need to disable them all when one is clicked. Putting the original href back into each one doesn't seem possible (at least with my designer trying out this javascript thing smarts). And I'm afraid I'm not sure what a timeout method is... On May 27, 3:58 pm, GaVrA ga...@crtaci.info wrote: You can use timeout method, or maybe changing href attribute to href= $(.btn).click(function(){ var oriHref = $(this).attr('href'); //.btn is now NOT clickable $(this).attr('href' : ''); $(#somethingElse).doStuff(slow, function(){ //.btn is now clickable $('.btn').attr('href' : 'oriHref'); }); } On May 27, 3:05 pm, Fluffica thomas.james.winstan...@googlemail.com wrote: Good Afternoon (or morning depending on where you are). I really hate posting probably quite simple questions to forums, but this is really foxing me. $(.btn).click(function(){ //.btn is now NOT clickable $(#somethingElse).doStuff(slow, function(){ //.btn is now clickable }); } I've got a long navigation, and pages slide in and out of view. Troubles are, if the user impaitently clicks a load of links while the page loading and sliding in is happening, it melts my (probably poorly written) code. So, I'm trying to stop the user from clicking on any other buttons, while the page loader is doing it's thing.
[jQuery] Re: Making a button in active
oriHref is just variable containing value of href atribute... :) Could you post some demo page or paste here some code? On May 27, 5:17 pm, Fluffica thomas.james.winstan...@googlemail.com wrote: I thought oriHref was a fancy part of jQuery there. Well, hopefull thinking. Unfortunatly I've got a long list of dynamic links, and need to disable them all when one is clicked. Putting the original href back into each one doesn't seem possible (at least with my designer trying out this javascript thing smarts). And I'm afraid I'm not sure what a timeout method is... On May 27, 3:58 pm, GaVrA ga...@crtaci.info wrote: You can use timeout method, or maybe changing href attribute to href= $(.btn).click(function(){ var oriHref = $(this).attr('href'); //.btn is now NOT clickable $(this).attr('href' : ''); $(#somethingElse).doStuff(slow, function(){ //.btn is now clickable $('.btn').attr('href' : 'oriHref'); }); } On May 27, 3:05 pm, Fluffica thomas.james.winstan...@googlemail.com wrote: Good Afternoon (or morning depending on where you are). I really hate posting probably quite simple questions to forums, but this is really foxing me. $(.btn).click(function(){ //.btn is now NOT clickable $(#somethingElse).doStuff(slow, function(){ //.btn is now clickable }); } I've got a long navigation, and pages slide in and out of view. Troubles are, if the user impaitently clicks a load of links while the page loading and sliding in is happening, it melts my (probably poorly written) code. So, I'm trying to stop the user from clicking on any other buttons, while the page loader is doing it's thing.
[jQuery] inline script html vs xhtml
I am a bit perplexed at why a simple bit of code I have is firing in HTML but not in the equivalent XHTML. Here is the HTML file (that works as expected): html head titleText Demo/title meta http-equiv=Content-type content=text/html;charset=UTF-8 link rel=stylesheet type=text/css href=stylesheets/default.css script type=text/javascript src=js/jquery-1.3.2.min.js/script !-- script type=text/javascript src=js/jRewriter.js charset=UTF-8/ -- script type=text/javascript $(function() { alert(hi); }); /script /head body /body /html And here is the XHTML file (that does not work as expected): !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1- strict.dtd html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en head titleText Demo/title meta http-equiv=Content-type content=text/html;charset=UTF-8 / link rel=stylesheet type=text/css href=stylesheets/default.css / script type=text/javascript src=js/jquery-1.3.2.min.js / script type=text/javascript //![CDATA[ $(function() { alert(hi); }); //]] /script /head body /body /html Is there something I am missing here? Thanks. Dean
[jQuery] superfish layout
Hi all, i want to change the layout of the superfish navbar, but can't get my grip on the CSS. I want to lose the backgrounds so the menu is only text. This way it will fit into my site. Who knows how i do this?
[jQuery] Re: Hiding a cfoutput until clicked
You cannot reference coldfusion variables with javascript directly. I would instead wrap each cfoutput in a span and use that. On May 26, 8:12 pm, grabit webmas...@communityonline.co.nz wrote: Hi There i want to hide my phone numbers in an output page so that the viewer has to click an icon to see it. i have the following jquery so far: !---JQuery test to hide phone--- script type=text/javascript src=jquery.js/script script type=text/javascript $(document).ready(function() { $(contains:('freelist.busphone'),this).hide(); }); and this is the code with the phone number i want to hide: cfloop query=freelist startrow=#URL.offset# endrow=#limit# cfoutput tr bgcolor=###iif(currentrow MOD 2,DE('ebebeb'),DE ('ff'))# class=smalltext11light td width=81%nbsp;#freelist.busname# /td td width=19% align=rightnbsp;#freelist.busphone#/ td /tr /cfoutput /cfloop Just how do i reference that #freelist.busphone# in the 2nd line of my jquery please cheers and thanks in advance Grabit
[jQuery] Submitting Form does not refresh Text Area
I have 4 forms on my HTML Page and 1 text area in each form. This text area displays some content to user after reading from Database. But when form gets submitted, the textArea does not get refreshed. This is the code: $cgi-textarea({-id= $res.CommentHistoryId, -name= $res.CommentHistory, -rows=4, -cols=60, -readonly=readonly, -default=$commHistory})); Even Adding following does not help: my $historyId = $res. CommentHistoryId; print $cgi-script({-language='javascript'}, 'var histArea = document.getElementById(' . '$historyId'. ');' 'histArea.value =' . '$commHistory'); The value of $commHistory is proper. The only issue the text Area does not get refreshed. Refreshing the page does not help either. But when I submit some other form, this area gets refreshed. Also the running the script from command line shows proper value in text area. It seems some cahing issue in browser. Could some Pls help me here. I newbie to web technologies I have tested it in Firefox and IE. no luck anywhere.
[jQuery] trying to implement accessible_news_slider in a site
I'm trying to implement this http://www.reindel.com/accessible_news_slider/ on http://mercantipercaso.com/ I would to surf .articoli under Eventi but I'm totally lost on how to modify the jquery.accessible-news- slider.js They used an ul in the example,I've got just a div class=articoli/div per 'event',thought it should be easy to implement it,but now I don't have absolutely idea on how to do it.
[jQuery] superfish layout
Hello, i can't get my grip on the CSS of the superfish. I'm using the navbar system, but i want to use it without the backgrounds. So that the menu fits in my site. What do i need to change? Greetings Bjorn
[jQuery] Re: Making a button in active
Why don't you just add the class, like this: $(.btn).click(function(){ if($(this).hasClass('disabled')) //alert(can't touch this!); } else { $(this).addClass('disabled'); $(#somethingElse).doStuff('slow', function(){ $('.btn').removeClass('disabled'); }); } });
[jQuery] Re: Making a button in active
another option is put an overlay over them Fluffica wrote: I thought "oriHref" was a fancy part of jQuery there. Well, hopefull thinking. Unfortunatly I've got a long list of dynamic links, and need to disable them all when one is clicked. Putting the original href back into each one doesn't seem possible (at least with my "designer trying out this _javascript_ thing" smarts). And I'm afraid I'm not sure what a timeout method is... On May 27, 3:58pm, GaVrA ga...@crtaci.info wrote: You can use timeout method, or maybe changing href attribute to href="" $(".btn").click(function(){ var oriHref = $(this).attr('href'); //.btn is now NOT clickable $(this).attr('href' : ''); $("#somethingElse").doStuff("slow", function(){ //.btn is now clickable $('.btn').attr('href' : 'oriHref'); }); } On May 27, 3:05pm, Fluffica thomas.james.winstan...@googlemail.com wrote: Good Afternoon (or morning depending on where you are). I really hate posting probably quite simple questions to forums, but this is really foxing me. $(".btn").click(function(){ //.btn is now NOT clickable $("#somethingElse").doStuff("slow", function(){ //.btn is now clickable }); } I've got a long navigation, and pages slide in and out of view. Troubles are, if the user impaitently clicks a load of links while the page loading and sliding in is happening, it melts my (probably poorly written) code. So, I'm trying to stop the user from clicking on any other buttons, while the page loader is doing it's thing.
[jQuery] Re: Where to find a proper slide effect?
Nemaš frke Mario... ;) On May 27, 2:29 pm, M.M. mario.maru...@gmail.com wrote: Thanks Gavra, I just needed the idea :) I added the wrapper animation and it works fine now. For those guys who asked it before, I made 'myslide' effect based on UI 'slide', and it's onhttp://sklupc.com/slide2(it works only up/ down for now)
[jQuery] Re: inline script html vs xhtml
dhoover wrote: I am a bit perplexed at why a simple bit of code I have is firing in HTML but not in the equivalent XHTML. Here is the HTML file (that works as expected): [ ... ] script type=text/javascript src=js/jquery-1.3.2.min.js / This is the culprit. I'm not sure why, but script tags are never allowed to self-close like that. Try script type=text/javascript src=js/jquery-1.3.2.min.js/script Cheers, -- Scott
[jQuery] Re: Reuse ajax calls
Lideln wrote: Is there a way to store ajax calls in variables and reuse them later ? I saw that $.ajax is returning the XHR object, maybe it could be a lead ? Are you trying to save the XHR object jQuery uses internally, the jQuery parameters to the call, or the results of the call? The last one is easy: just define a success function, and save the result of the first parameter. The second one is straightforward too. $.ajax() takes an object. You can cache that if you want. As to the first possibility, which is what it sounds like you want, I'm not sure jQuery exposes it. But of what use would it be anyway after the call is complete? -- Scott
[jQuery] Re: Read Pro JavaScript Techniques?
Considering that the list shows Flanagan's book as the only recommendation, I don't find it a viable resource for true recommendations on DOM scripting or JavaScript. Flanagan's book is absolutely amazing but there are plenty of updated books which are outstanding JavaScript resources. Leaving them out makes the list somewhat suspect in my opinion. Rey... RobG wrote: On May 23, 1:12 am, finneycanhelp lovefin...@gmail.com wrote: Have you read the book Pro JavaScript Techniques Published December 2006? No. Still good / applicable? It is not on the recommended list at the comp.lang.javascript FAQ: URL: http://www.jibbering.com/faq/#books (book image and links athttp://jspro.org/) Do you know of an active and better email list (or discussion group) for such general JavaScript questions? news:comp.lang.javascript URL: http://groups.google.com/group/comp.lang.javascript/topics?gvc=2 -- Rob
[jQuery] Re: Read Pro JavaScript Techniques?
Yep that's an understatement. Then again, they have the same bias towards every major JS framework project. I've made a personal choice not to bother with CLJ due to their obvious biases and the vitriol replies to anyone who goes against their opinions. You will find some good information from the few folks who are on there and understand how to respectfully interact with others but too many of the participants are just absolute asshats. Rey... Ricardo wrote: On May 24, 2:01 am, RobG rg...@iinet.net.au wrote: Still good / applicable? It is not on the recommended list at the comp.lang.javascript FAQ: URL:http://www.jibbering.com/faq/#books The guys at comp.lang.javascript have a very strong bias against J. Resig, jQuery and other JS frameworks, that's not surprising :)
[jQuery] Re: jQuery, MooTools, and Prototype - A Comparison
That and the fact that we have an amazing community who is willing to work with developers of all experience levels. In addition, we have a core team that is completely accessible and willing to interact with the jQuery community. Essentially, we go to great lengths to: 1) Listen to the jQuery community 2) Provide as many resources as possible to get valuable information out to jQuery developers 3) Ensure that everyone on the team is accessible and respectful 4) continue to evolve jQuery to meet the needs of the community Unlike other projects, we are out in the community trying to help out and it's one of our core priorities, not an after-thought. Rey... jQuery Team kiusau wrote: jQuery outperforms Prototype by leaps and bounds. Surely this is an important reason for jQuery's increasingly popularity over Prototype. Thanks for the great reference! Roddy On May 21, 1:02 pm, Jackson Ferreira de Andrade Mafra jacksonf...@gmail.com wrote: http://blog.creonfx.com/examples/javascript/speed-compersion-raw-data...http://blog.creonfx.com/javascript/mootools-vs-jquery-vs-prototype-vs... att. (ツ) Jackson F. de A. Mafra Designer,Desenvolvedor e Consultorhttp://www.jacksonfdam.com.br Esta mensagem, incluindo seus anexos, pode conter informações confidenciais e/ou privilegiadas. Se você não for a pessoa autorizada a receber esta mensagem, não pode usar, copiar ou divulgar as informações nela contidas ou tomar qualquer ação baseada nessas informações. Caso esta mensagem tenha sido recebida por engano, por favor avise imediatamente o remetente, respondendo o e-mail e em seguida elimine-a do seu sistema. Agradeço sua cooperação. On Thu, May 21, 2009 at 5:00 PM, Matt Kruse m...@thekrusefamily.com wrote: All 3 frameworks have pros and cons. They have many technical similarities and each come with their own set of problems. If you can avoid using a framework, always do that. But if the pros of using a framework outweigh the cons, I think the decision mostly comes down to popularity. Choose the framework that will have the most documentation, the biggest user community, will be around the longest, will have the most number of developers familiar with it, and can be seen as gaining in popularity rather than declining. If you look at Google Trends to compare the three: http://www.google.com/trends?q=jquery+javascript%2Cmootools+javascrip... you'll see that MooTools and Prototype are steady or declining, while jQuery has a dominant lead in popularity and is increasing rapidly. Granted, this is only an analysis of searches, but it's a fair picture of relative popularity of the different frameworks. There is always some safety in choosing the market leader and if you are going in blind with no desire to do an in-depth analysis of each option, then choosing jQuery would probably be your safest best. IMO, Matt Kruse On May 21, 2:05 pm, kiusau kiu...@mac.com wrote: After a badly needed pause of some length, my need for sophisticated JavaScript has reemerged. During my departure I have discovered two other similar JavaScript modules called MooTools and Prototype. With my reemergence I have also realized that all of these require a certain amount of commitment that goes beyond what I initially anticipated. What I would like from you all is a convincing argument to remain that is based on the following comparison: 1) What are the principal advantages of jQuery over Prototype and MooTools? 2) What are the principal disadvantages of jQuery when compared with Protoype and MooTools? Roddy
[jQuery] Tablesorter and zebra - does not stripe rows on initial sort
With a tablesorter config that looks something like this: $(#table).tablesorter({ cssHeader: sortAble, cssAsc: sortAsc, cssDesc: sortDesc, headers: {3: {sorter: 'time'}}, sortList: sortOrder, widgets: ['zebra'], widgetZebra: { css: ['','alt'] }, debug: true }); The alternating row style is not applied to the odd/even rows on the initial display of the table. If a user clicks any of the headers to change the sort-by column, or to change the sort-order, then the striping is applied. Does anyone know what might cause this? I'm using jQuery 1.3.2 and tablesorter 2.0.3. Searching the list for tablesorter zebra, I found mention of needing to patch tablesorter 2.0.3 for 1.3.2 (http://groups.google.com/group/ jquery-en/browse_thread/thread/ecd890538837818b/3166d5b2b9b5cf72? hl=enlnk=gstq=tablesorter+zebra#3166d5b2b9b5cf72) - does this still apply? Thanks
[jQuery] Re: Tablesorter and zebra - does not stripe rows on initial sort
Ok so after actually testing if the patch mentioned in that other posting fixes this problem, I can safely say that it does fix my issue :) On May 27, 12:21 pm, Matt Brown matt.br...@citrix.com wrote: With a tablesorter config that looks something like this: $(#table).tablesorter({ cssHeader: sortAble, cssAsc: sortAsc, cssDesc: sortDesc, headers: {3: {sorter: 'time'}}, sortList: sortOrder, widgets: ['zebra'], widgetZebra: { css: ['','alt'] }, debug: true }); The alternating row style is not applied to the odd/even rows on the initial display of the table. If a user clicks any of the headers to change the sort-by column, or to change the sort-order, then the striping is applied. Does anyone know what might cause this? I'm using jQuery 1.3.2 and tablesorter 2.0.3. Searching the list for tablesorter zebra, I found mention of needing to patch tablesorter 2.0.3 for 1.3.2 (http://groups.google.com/group/ jquery-en/browse_thread/thread/ecd890538837818b/3166d5b2b9b5cf72? hl=enlnk=gstq=tablesorter+zebra#3166d5b2b9b5cf72) - does this still apply? Thanks
[jQuery] Re: Making a button in active
This is definitely the best option, as you can achieve everything that you might need The disabled css class can a) have the same text colour as the text b) set text-decoration to none c) set the cursor the normal one d) have an a.disabled:hover pseudo-class to do a b Just remember to include a return false at the end of the function (as appropriate) L M.M. wrote: Why don't you just add the class, like this: $(.btn).click(function(){ if($(this).hasClass('disabled')) //alert(can't touch this!); } else { $(this).addClass('disabled'); $(#somethingElse).doStuff('slow', function(){ $('.btn').removeClass('disabled'); }); } }); No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.339 / Virus Database: 270.12.42/2137 - Release Date: 05/27/09 07:50:00
[jQuery] Re: find reverse
The closest()-method (available since jquery 1.3) would be ideal here, as it stops searching when an element matching the expression is found. See also: http://docs.jquery.com/Traversing/closest Please also note that ids are unique within a document, so just $ (#test0) should be fast enough. On May 27, 4:58 pm, Peter Marino marino.pe...@gmail.com wrote: hi, did not see the parents() method before now.. it does look this is what I need.. will check when I get home from work... thanks peter On Wed, May 27, 2009 at 4:49 PM, M.M. mario.maru...@gmail.com wrote: On May 27, 2:19 pm, Peter Marino marino.pe...@gmail.com wrote: Hi jQuery Group, is it possible find a node backwards instead of forwards. isn't that parents()? (not parent, parents :) http://docs.jquery.com/Traversing/parents -- Power Tumbling -http://www.powertumbling.dk OSG-Help -http://osghelp.com
[jQuery] [validate] multiple labels per form element
I've found the Validate plugin to be really useful, but one issue I have is the label markup that the plugin generates to contain the validation message. Since forms should have label markup associated with the field description (e.g. First name), this means that you end up with two labels associated with each field. The W3C allows multiple labels per form element, but unfortunately many screen readers apparently can't cope with this. See: http://www.456bereastreet.com/archive/200809/multiple_form_labels_and_screen_readers/ There doesn't seem to be a satisfactory solution to this situation. I worked around it by hacking the Validate script to output a span instead of a label. Simon
[jQuery] selecting next()'s until I reach a tag
Is there a way for me to add the next several blocks until I get to a specific tag? So let's say the code is: h5title/h5 pdescription text/p pdescription text/p h5title2/h5 pdescription text/p pdescription text/p pdescription text/p h5title2/h5 pdescription text/p Basically, I want to select all the p tags until I get to the h5. There might be 1 p tag, there might be 10 of them, but I want to traverse this structure to add all p tags. Right now, I'm doing this to select 1 of the p tags: $('h5').each(function(){ var $this = $(this); $this .add($this.next()); });
[jQuery] MultiPage Form plugins?
I am looking for a plugin to paginate a multiple page form. I would like to decouple validation and navigation forward and back. What plugins or demos can you recommend for pagination of forms? Thanks.
[jQuery] Re: [validate] mulitpage forms
Please post a link to the multipage form demo. Thanks. -- View this message in context: http://www.nabble.com/-validate--mulitpage-forms-tp16339750s27240p23746573.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: MultiPage Form plugins?
if it was me, i'd use UI Tabs to break up the form controls and just group the validation rules (or roll my own validation to keep it per tab)... but that's just a suggestion On May 27, 12:40 pm, MPowered monte.hayw...@gmail.com wrote: I am looking for a plugin to paginate a multiple page form. I would like to decouple validation and navigation forward and back. What plugins or demos can you recommend for pagination of forms? Thanks.
[jQuery] Specifying THUMBS in JCarousel -- sorry if this has been answered elsewhere
Probably a stupid newb question, but -- Can I specify the thumbnail files that JCarousel is going to use rather than having the plugin generate its own thumbs? I already have the data -- it seems silly to waste processor time on thumbnail generation when the thumbs are already available. This question has probably answered elsewhere, but I haven't been able to find the thread -- thanks for anyone who can help me out. I've read through Sorgalla's docs several times to no avail. Chad
[jQuery] Re: selecting next()'s until I reach a tag
Try: $('h5').nextAll('p'); Maurício -Mensagem Original- De: Andy Para: jQuery (English) Enviada em: quarta-feira, 27 de maio de 2009 14:11 Assunto: [jQuery] selecting next()'s until I reach a tag Is there a way for me to add the next several blocks until I get to a specific tag?
[jQuery] Re: selecting next()'s until I reach a tag
Thanks for the suggestion! That sort of works, but it's also getting the p tags AFTER the next H5, and I don't want it to. On May 27, 1:24 pm, Mauricio \(Maujor\) Samy Silva css.mau...@gmail.com wrote: Try: $('h5').nextAll('p'); Maurício -Mensagem Original- De: Andy Para: jQuery (English) Enviada em: quarta-feira, 27 de maio de 2009 14:11 Assunto: [jQuery] selecting next()'s until I reach a tag Is there a way for me to add the next several blocks until I get to a specific tag?
[jQuery] Re: [validate] multiple labels per form element
Show me the HTMlL and explain to me what you want to achieve. I'm sure there is an easier way. On Wed, May 27, 2009 at 6:04 PM, Fountain Internet sijones.uk@ googlemail.com wrote: I've found the Validate plugin to be really useful, but one issue I have is the label markup that the plugin generates to contain the validation message. Since forms should have label markup associated with the field description (e.g. First name), this means that you end up with two labels associated with each field. The W3C allows multiple labels per form element, but unfortunately many screen readers apparently can't cope with this. See: http://www.456bereastreet.com/archive/200809/multiple_form_labels_and_screen_readers/ There doesn't seem to be a satisfactory solution to this situation. I worked around it by hacking the Validate script to output a span instead of a label. Simon
[jQuery] Re: MultiPage Form plugins?
The UI Tabs is good :) Theres really many forms of pagination. verticle tabbing. horizontal tabbing. numberings etc. you can use Dynamic tabbing if you don't want to do AJAX methods to load content into a container when a certain value is clicked. Did you have anything specific i mind ? On Wed, May 27, 2009 at 7:20 PM, MorningZ morni...@gmail.com wrote: if it was me, i'd use UI Tabs to break up the form controls and just group the validation rules (or roll my own validation to keep it per tab)... but that's just a suggestion On May 27, 12:40 pm, MPowered monte.hayw...@gmail.com wrote: I am looking for a plugin to paginate a multiple page form. I would like to decouple validation and navigation forward and back. What plugins or demos can you recommend for pagination of forms? Thanks.
[jQuery] Re: jQuery, the Ready Function, and Other Javascript - A Dirt Simple Inquiry
On May 26, 12:21 pm, Ricardo ricardob...@gmail.com wrote: 1. Do you get errors if you remove the last 2 spry scripts? 2. Regardless of which script does what, you should put the $().ready ( always after all the scripts as a safety measure, there's no negative impact. 3. If I remember a recent discussion, you shouldn't use the vsdoc version of jQuery, it's only for the VS auto-complete. Load the normal one fromhttp://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js Hi Ricardo, I have changed my jQuery file and placed the ready function beneath all of my other script tags, but the problem persists. Luckily, however, while checking the results of these changes I accidentally learned how to use Firebug efficiently and discovered and removed one of the errors. Unfortunately, another error arose that I am finding difficult to explain. The error varies from browser to browser, as one might expect, as the purpose of the code is to retrieve browser information and respond with different information for each. Fortunately, all of the errors point to the same source file indicating a recurring pattern -- the syntax or description of my overprompt( ) functions. There are five such functions and they all reside in the following JavaScript file: http://homepage.mac.com/moogoonghwa/Imagine_Prototype/JavaScript/popUpBoxConfiguration.js . These functions are a combination of code that I found on the jQ_Impromptu plug-in webpage and my own creation. What is mine in the following example is the name of the function, the variable errorMSG, the function assigned to this variable -- namely, loadErrorMessages ( ), and the property assigned to the object created by the loadErrorMessages( ) -- namely, ipvb_approval. The loadErrorMessages ( ) function is defined in http://homepage.mac.com/moogoonghwa/Imagine_Prototype/JavaScript/errorMessages.js I suspect that the problem lies in my own code. Nevertherless, I am also suspicious of the author's specification of the $.prompt( ) method which is described in http://homepage.mac.com/moogoonghwa/Imagine_Prototype/JavaScript/jQ_Impromptu-2.5.js at the very top of the document. I do not understand the $.function ( ) syntax. Is this shorthand for $( ).function( )? function = overprompt3() { var errorMSG = loadErrorMessages(); var temp = { state0: { html:errorMSG.ipvb_approval, buttons: {Continue: true}, focus: 1, opacity:0.6, submit:function(v,m,f){ if(v) { return true; } return false; } } } $.prompt(temp); } I look forward to your further assistance, as I recognize in you a certain competence not shared by everyone. Roddy
[jQuery] Re: jQuery, the Ready Function, and Other Javascript - A Dirt Simple Inquiry
On May 26, 5:51 am, infoaddicted jack.lapla...@gmail.com wrote: According to the documentation, the body of your ready function will execute when the DOM has loaded and is ready to traverse. The last two scripts manipulate the DOM, so I would put the ready function afterward so I could be more confident in the results. This is a good area for experimentation. Try creating a simple function that toggles, say, a text style. Call your toggle function from inside a ready function and also put a copy in a script src ... / file, then move them around, changing the order of the script src ... / and the $(document).ready(). You might be able to learn something by doing that which you could share with us and get a deeper understanding of execution order with jQuery. Hi, Jack! I know longer believe that the order in which I have entered my script tags is the source of the problem, but have made note of your method of experimentation for future similar difficulties. Please see my note to Ricardo for a further explanation of a more probable source of failure. Roddy
[jQuery] Re: input field name include . jquery cann't parse
On May 26, 2009, at 9:05 PM, RobG wrote: The choice is clear - the OP can simply stop using jQuery selectors for those elements, or stop using jQuery (or any other CSS selector- based framework) at all. Really? That's the only choice? As others have already noted, you can simply escape the . http://docs.jquery.com/Frequently_Asked_Questions#How_do_I_select_an_element_that_has_weird_characters_in_its_ID.3F Given that it's an ID, the OP could use: $(document.getElementById('user.name'))... Which is likely faster anyway. True, but the speed difference is likely negligible. The jQuery documentation does, after all, refer to them as weird and special characters. If you think there is more appropriate terminology, feel free to change it. The documentation site is a wiki. --Karl Karl Swedberg www.englishrules.com www.learningjquery.com
[jQuery] Re: Detect version of internet explorer using jquery
On May 27, 2009, at 2:47 AM, Nitin Sawant wrote: how to Detect version of internet explorer using jquery?? $.browser.msie $.browser.version also name of browser? You'll probably need to parse the string returned by navigator.userAgent keep in mind, though, that browser sniffing is usually a bad idea. --Karl Karl Swedberg www.englishrules.com www.learningjquery.com
[jQuery] Re: [validate] multiple labels per form element
ok, here's a snippet of my HTML: p label for=txtNameName: span class=requiredField*/span/ label br / input type=text id=txtName name=txtName / /p I adapted the Remember The Milk example code to validate my fields. For the above field the resulting markup becomes: p label for=txtNameName: span class=requiredField*/span/ label br / input type=text id=txtName name=txtName / label class=error for=txtName generated=truePlease enter your name/label /p i.e. two labels associated with one field. I want the generated label (i.e. the second label) to be a span instead. One of the plugin examples seems to do what I want (example.html) but when I tried to use the code in my own page, it continued to output label instead of span tags. I'd prefer not to fork the core code.
[jQuery] Re: selecting next()'s until I reach a tag
Please have a look at: http://docs.jquery.com/JQuery_1.2_Roadmap#.nextUntil.28.29_.2F_.prevUntil.28.29 Maurício -Mensagem Original- De: Andy Para: jQuery (English) Enviada em: quarta-feira, 27 de maio de 2009 14:32 Assunto: [jQuery] Re: selecting next()'s until I reach a tag Thanks for the suggestion! That sort of works, but it's also getting the p tags AFTER the next H5, and I don't want it to. On May 27, 1:24 pm, Mauricio \(Maujor\) Samy Silva css.mau...@gmail.com wrote: Try: $('h5').nextAll('p'); Maurício
[jQuery] disabling all click events on all DOM elements for a small bit of time
I am new to jquery and to web development in general. I have many elements (over 100) on a page each with an onclick event listener function. They have different listener function names and varying number of parameters. The functions may take a second or two to process. If I click on any one of them, I need to disable the mouse click on all the rest until the process is done. Using bind() and unbind() is unrealistic (at least as far as my limited understanding of them is concerned) because of all the different function names and different number of parameters for each. I say 'unrealistic', but, of course, I may be way-off here. So my question is; is there a jquery trick, a javascript trick or even a css trick that can help me do this easily? Your help is greatly appreciated. jake
[jQuery] Tablesorter is not enabled on my page
Hello, I am trying out the Tablesorter in Wordpress 2.7.1 to make a membership list sortable. For some reason the sortable features isn't being enabled (or at least visible). I need help find the culprit. Here are the steps I've taken so far: 1) In the header.php file I added the following code between the head tags: head script type=text/javascript src=library/scripts/jquery- latest.js/script script type=text/javascript src=library/scripts/ jquery.tablesorter.js/script ?php wp_head(); ? /head (the scripts directory is located at /wp/wp-content/themes/mytheme/ library/scripts/) 2) and in the jquery.tablesorter.js script I added the following code just below the comments at the top: (per http://www.nabble.com/Tablesorter-Into-Wordpress-page-td21007774.htm) $(document).ready(function() { $(1).tablesorter( {sortList: [[0,0], [1,0]]} ); } ); (I tried putting this function in the header itself, as what http://tablesorter.com/docs/#Getting-Started seem to be saying, but this had only the effect of displaying this code on the page itself.) 3) On the page with the table, I used the same sample table from http://tablesorter.com/docs/#Getting-Started, using 1 for the ID. table id=1 thead tr thLast Name/th thFirst Name/th thEmail/th thDue/th thWeb Site/th /tr /thead tbody tr tdSmith/td tdJohn/td tdjsm...@gmail.com/td td$50.00/td tdhttp://www.jsmith.com/td /tr tr tdBach/td tdFrank/td tdfb...@yahoo.com/td td$50.00/td tdhttp://www.frank.com/td /tr /tbody /table But, while the table shows up on the page, the sortable features are not visible. NOTE: In Wordpress I have the WP-Table Reloaded plugin activated, but to trouble shoot this issue, I am not using the shortcode and using a HTML table directly in the page, for now. Please advise what I need to do to fix this? Thanks! Amy
[jQuery] Re: Tablesorter is not enabled on my page
I think you didnt make selector valid. You need to use them just like you use in css. For instance, you have this: $(1).tablesorter( {sortList: [[0,0], [1,0]]} ); it should be this: $(#1).tablesorter( {sortList: [[0,0], [1,0]]} ); On May 27, 7:26 pm, bayadmin admin.baynet...@gmail.com wrote: Hello, I am trying out the Tablesorter in Wordpress 2.7.1 to make a membership list sortable. For some reason the sortable features isn't being enabled (or at least visible). I need help find the culprit. Here are the steps I've taken so far: 1) In the header.php file I added the following code between the head tags: head script type=text/javascript src=library/scripts/jquery- latest.js/script script type=text/javascript src=library/scripts/ jquery.tablesorter.js/script ?php wp_head(); ? /head (the scripts directory is located at /wp/wp-content/themes/mytheme/ library/scripts/) 2) and in the jquery.tablesorter.js script I added the following code just below the comments at the top: (perhttp://www.nabble.com/Tablesorter-Into-Wordpress-page-td21007774.htm) $(document).ready(function() { $(1).tablesorter( {sortList: [[0,0], [1,0]]} ); } ); (I tried putting this function in the header itself, as whathttp://tablesorter.com/docs/#Getting-Startedseem to be saying, but this had only the effect of displaying this code on the page itself.) 3) On the page with the table, I used the same sample table fromhttp://tablesorter.com/docs/#Getting-Started, using 1 for the ID. table id=1 thead tr thLast Name/th thFirst Name/th thEmail/th thDue/th thWeb Site/th /tr /thead tbody tr tdSmith/td tdJohn/td tdjsm...@gmail.com/td td$50.00/td tdhttp://www.jsmith.com/td /tr tr tdBach/td tdFrank/td tdfb...@yahoo.com/td td$50.00/td tdhttp://www.frank.com/td /tr /tbody /table But, while the table shows up on the page, the sortable features are not visible. NOTE: In Wordpress I have the WP-Table Reloaded plugin activated, but to trouble shoot this issue, I am not using the shortcode and using a HTML table directly in the page, for now. Please advise what I need to do to fix this? Thanks! Amy
[jQuery] Re: disabling all click events on all DOM elements for a small bit of time
Hi, I think you should use the blockUI plugin. It's really simple, and exactly what you are looking for, unless I'm mistaken. On May 27, 7:58 pm, con-man-jake jakedim...@gmail.com wrote: I am new to jquery and to web development in general. I have many elements (over 100) on a page each with an onclick event listener function. They have different listener function names and varying number of parameters. The functions may take a second or two to process. If I click on any one of them, I need to disable the mouse click on all the rest until the process is done. Using bind() and unbind() is unrealistic (at least as far as my limited understanding of them is concerned) because of all the different function names and different number of parameters for each. I say 'unrealistic', but, of course, I may be way-off here. So my question is; is there a jquery trick, a javascript trick or even a css trick that can help me do this easily? Your help is greatly appreciated. jake
[jQuery] Re: Reuse ajax calls
On May 27, 6:00 pm, Scott Sauyet li...@sauyet.com wrote: Lideln wrote: Is there a way to store ajax calls in variables and reuse them later ? I saw that $.ajax is returning the XHR object, maybe it could be a lead ? Are you trying to save the XHR object jQuery uses internally, the jQuery parameters to the call, or the results of the call? The last one is easy: just define a success function, and save the result of the first parameter. The second one is straightforward too. $.ajax() takes an object. You can cache that if you want. As to the first possibility, which is what it sounds like you want, I'm not sure jQuery exposes it. But of what use would it be anyway after the call is complete? Oh my god, is it possible that I'm so blind ? Maybe it's because I've not been sleeping much these times... You are right, what I'm trying to do is to save the ajax call parameters... Which is, as you say, so obvious to do !! I'm sorry for that pointless thread, but at least you have opened my eyes and I'll be able to continue my work :) Thanks a lot ! Lideln -- Scott
[jQuery] Re: [validate] multiple labels per form element
you don't need a plugin to do this for you. its just unnecessary memory usage. all you would need to do is first add a class to your p tag like p class=one then the script $(p.one).append('span class=errorMy Error\/span'): On Wed, May 27, 2009 at 8:22 PM, Fountain Internet sijones.uk@ googlemail.com wrote: ok, here's a snippet of my HTML: p label for=txtNameName: span class=requiredField*/span/ label br / input type=text id=txtName name=txtName / /p I adapted the Remember The Milk example code to validate my fields. For the above field the resulting markup becomes: p label for=txtNameName: span class=requiredField*/span/ label br / input type=text id=txtName name=txtName / label class=error for=txtName generated=truePlease enter your name/label /p i.e. two labels associated with one field. I want the generated label (i.e. the second label) to be a span instead. One of the plugin examples seems to do what I want (example.html) but when I tried to use the code in my own page, it continued to output label instead of span tags. I'd prefer not to fork the core code.
[jQuery] Re: disabling all click events on all DOM elements for a small bit of time
you this you can use the bind() and unbind() right ? On Wed, May 27, 2009 at 9:17 PM, Lideln lid...@gmail.com wrote: Hi, I think you should use the blockUI plugin. It's really simple, and exactly what you are looking for, unless I'm mistaken. On May 27, 7:58 pm, con-man-jake jakedim...@gmail.com wrote: I am new to jquery and to web development in general. I have many elements (over 100) on a page each with an onclick event listener function. They have different listener function names and varying number of parameters. The functions may take a second or two to process. If I click on any one of them, I need to disable the mouse click on all the rest until the process is done. Using bind() and unbind() is unrealistic (at least as far as my limited understanding of them is concerned) because of all the different function names and different number of parameters for each. I say 'unrealistic', but, of course, I may be way-off here. So my question is; is there a jquery trick, a javascript trick or even a css trick that can help me do this easily? Your help is greatly appreciated. jake
[jQuery] Re: Where to find a proper slide effect?
It's easier to hook the inner element to the bottom and just animate the outer one: http://snipt.org/kgM (avoided wrapInner 'cause it doesn't preserve the original element) On May 27, 12:58 am, GaVrA ga...@crtaci.info wrote: I am really tired now, so cant think this all the way through but the idea is to animate at the same time outer div by its height and inner by its top value so you get that effect. Something like this maybe: aclick for slide/a div div lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum /div /div div lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum /div On May 26, 8:49 pm, M.M. mario.maru...@gmail.com wrote: On May 26, 8:32 pm, tain bugi@gmail.com wrote: they only have different easing value..otherwise they are identical. No they're not! Are we looking at the same page? The effect you get when you click Slide Out or Slide In onhttp://docs.jquery.com/Tutorials:Live_Examples_of_jQueryisNOT the slide effect I want. It's not even similar to scriptaculous effect in my example, because the text doesn't go with the slide, it just stays in place and gets revealed (it's normal jQuery 'slide' effect, in jQuery UI it's called 'blind') Please, people, don't post answers like this, someone who actually knows the answer might think it's already answered.
[jQuery] Re: selecting next()'s until I reach a tag
That looks great but I don't know how to implement it into my jQuery library. When I include it in the page or in my jQuery file, I get all sorts of errors. On May 27, 2:58 pm, Mauricio \(Maujor\) Samy Silva css.mau...@gmail.com wrote: Please have a look at:http://docs.jquery.com/JQuery_1.2_Roadmap#.nextUntil.28.29_.2F_.prevU... Maurício -Mensagem Original- De: Andy Para: jQuery (English) Enviada em: quarta-feira, 27 de maio de 2009 14:32 Assunto: [jQuery] Re: selecting next()'s until I reach a tag Thanks for the suggestion! That sort of works, but it's also getting the p tags AFTER the next H5, and I don't want it to. On May 27, 1:24 pm, Mauricio \(Maujor\) Samy Silva css.mau...@gmail.com wrote: Try: $('h5').nextAll('p'); Maurício
[jQuery] Re: disabling all click events on all DOM elements for a small bit of time
How about setting a global variable such that it will be 'on' when a function is running, and set back to 'off' when done? Whenever a function sees that it's 'on' it will not execute. Aside from that, knowing you have so many elements with an onclick event, is there any other way to re-work your design so that it can use the same function? Javascript doesn't have function overloading (creating functions with the same name but with different number of arguments), but since you can pass in as much arguments as you want into a function, you can do an argument count (or type) check and determine what you want to do. Alternatively, if possible, store your parameter content separately (e.g. a JSON object) that can be referenced to from a specific element (e.g. by an ID). The reason you'd probably want to combine it into one controller function is so that you can bind that one controller function to your page using event delegation. I'm not sure what you're doing now, but I assume you're binding onclicks one-by-one onto every element. Doing this with hundreds of elements makes your page load very slow. Event delegation binds it only once to the parent element of all those elements. Then when the child element is clicked, it will delegate the event to the parent. Then you do checks in the function to determine which child was clicked on (using the event object that's automatically created), and when you get that, you can act on it along with the data associated to it. Here's some reference on event delegation: http://www.learningjquery.com/2008/03/working-with-events-part-1 http://lab.distilldesign.com/event-delegation/ Hope that helps. On May 27, 7:58 am, con-man-jake jakedim...@gmail.com wrote: I am new to jquery and to web development in general. I have many elements (over 100) on a page each with an onclick event listener function. They have different listener function names and varying number of parameters. The functions may take a second or two to process. If I click on any one of them, I need to disable the mouse click on all the rest until the process is done. Using bind() and unbind() is unrealistic (at least as far as my limited understanding of them is concerned) because of all the different function names and different number of parameters for each. I say 'unrealistic', but, of course, I may be way-off here. So my question is; is there a jquery trick, a javascript trick or even a css trick that can help me do this easily? Your help is greatly appreciated. jake
[jQuery] Re: selecting next()'s until I reach a tag
Do a loop like this (this example adds alternating colors to the groups of paragraphs): $('h5').each(function(i){ var colors = ['green', 'red', 'blue']; n = $(this), ps = []; while( (n = n.next()).length !n.is('h5') ) ps.push( n[0] ); $(ps).css('color', colors[i%3]); }); Or use this (by John Resig, I think I've posted this a dozen times already..): jQuery.fn.nextUntil = function(expr) { var match = []; this.each(function(){ for( var i = this.nextSibling; i; i = i.nextSibling ) { if ( i.nodeType != 1 ) continue; if ( jQuery.filter( expr, [i] ).length ) break; match.push( i ); } }); return this.pushStack( match, arguments ); }; $('h5').each(function(){ $(this).nextUntil('h5').bleh(); }); On May 27, 2:32 pm, Andy andym...@gmail.com wrote: Thanks for the suggestion! That sort of works, but it's also getting the p tags AFTER the next H5, and I don't want it to. On May 27, 1:24 pm, Mauricio \(Maujor\) Samy Silva css.mau...@gmail.com wrote: Try: $('h5').nextAll('p'); Maurício -Mensagem Original- De: Andy Para: jQuery (English) Enviada em: quarta-feira, 27 de maio de 2009 14:11 Assunto: [jQuery] selecting next()'s until I reach a tag Is there a way for me to add the next several blocks until I get to a specific tag?
[jQuery] Re: disabling all click events on all DOM elements for a small bit of time
Magic. Thank you Lideln. It worked immediately. I was able to do it in seconds. Thank you again. On May 27, 3:17 pm, Lideln lid...@gmail.com wrote: Hi, I think you should use the blockUI plugin. It's really simple, and exactly what you are looking for, unless I'm mistaken. On May 27, 7:58 pm, con-man-jake jakedim...@gmail.com wrote: I am new to jquery and to web development in general. I have many elements (over 100) on a page each with an onclick event listener function. They have different listener function names and varying number of parameters. The functions may take a second or two to process. If I click on any one of them, I need to disable the mouse click on all the rest until the process is done. Using bind() and unbind() is unrealistic (at least as far as my limited understanding of them is concerned) because of all the different function names and different number of parameters for each. I say 'unrealistic', but, of course, I may be way-off here. So my question is; is there a jquery trick, a javascript trick or even a css trick that can help me do this easily? Your help is greatly appreciated. jake
[jQuery] Re: find reverse
Be aware that closest() returns the element itself if no match is found. I prefer to use $(el).parents('xx:first') to avoid that. Peter, no jQuery method will return null. If nothing is found it will return an empty collection (length == 0). On May 27, 2:03 pm, dabear bjorni...@gmail.com wrote: The closest()-method (available since jquery 1.3) would be ideal here, as it stops searching when an element matching the expression is found. See also:http://docs.jquery.com/Traversing/closest Please also note that ids are unique within a document, so just $ (#test0) should be fast enough. On May 27, 4:58 pm, Peter Marino marino.pe...@gmail.com wrote: hi, did not see the parents() method before now.. it does look this is what I need.. will check when I get home from work... thanks peter On Wed, May 27, 2009 at 4:49 PM, M.M. mario.maru...@gmail.com wrote: On May 27, 2:19 pm, Peter Marino marino.pe...@gmail.com wrote: Hi jQuery Group, is it possible find a node backwards instead of forwards. isn't that parents()? (not parent, parents :) http://docs.jquery.com/Traversing/parents -- Power Tumbling -http://www.powertumbling.dk OSG-Help -http://osghelp.com
[jQuery] Re: [validate] multiple labels per form element
I think you misunderstand what I'm trying to do. The plugin automatically inserts the second label - what I was trying to do was get it to use a span instead of a label, preferably without forking the code. On May 27, 8:24 pm, waseem sabjee waseemsab...@gmail.com wrote: you don't need a plugin to do this for you. its just unnecessary memory usage. all you would need to do is first add a class to your p tag like p class=one then the script $(p.one).append('span class=errorMy Error\/span'): On Wed, May 27, 2009 at 8:22 PM, Fountain Internet sijones.uk@ googlemail.com wrote: ok, here's a snippet of my HTML: p label for=txtNameName: span class=requiredField*/span/ label br / input type=text id=txtName name=txtName / /p I adapted the Remember The Milk example code to validate my fields. For the above field the resulting markup becomes: p label for=txtNameName: span class=requiredField*/span/ label br / input type=text id=txtName name=txtName / label class=error for=txtName generated=truePlease enter your name/label /p i.e. two labels associated with one field. I want the generated label (i.e. the second label) to be a span instead. One of the plugin examples seems to do what I want (example.html) but when I tried to use the code in my own page, it continued to output label instead of span tags. I'd prefer not to fork the core code.
[jQuery] Re: Tablesorter is not enabled on my page
Hi GaVrA, per your suggestion I added the # sign to the function and it did not make any difference. On May 27, 12:17 pm, GaVrA ga...@crtaci.info wrote: I think you didnt make selector valid. You need to use them just like you use in css. For instance, you have this: $(1).tablesorter( {sortList: [[0,0], [1,0]]} ); it should be this: $(#1).tablesorter( {sortList: [[0,0], [1,0]]} ); On May 27, 7:26 pm, bayadmin admin.baynet...@gmail.com wrote: Hello, I am trying out the Tablesorter in Wordpress 2.7.1 to make a membership list sortable. For some reason the sortable features isn't being enabled (or at least visible). I need help find the culprit. Here are the steps I've taken so far: 1) In the header.php file I added the following code between the head tags: head script type=text/javascript src=library/scripts/jquery- latest.js/script script type=text/javascript src=library/scripts/ jquery.tablesorter.js/script ?php wp_head(); ? /head (the scripts directory is located at /wp/wp-content/themes/mytheme/ library/scripts/) 2) and in the jquery.tablesorter.js script I added the following code just below the comments at the top: (perhttp://www.nabble.com/Tablesorter-Into-Wordpress-page-td21007774.htm) $(document).ready(function() { $(1).tablesorter( {sortList: [[0,0], [1,0]]} ); } ); (I tried putting this function in the header itself, as whathttp://tablesorter.com/docs/#Getting-Startedseemto be saying, but this had only the effect of displaying this code on the page itself.) 3) On the page with the table, I used the same sample table fromhttp://tablesorter.com/docs/#Getting-Started, using 1 for the ID. table id=1 thead tr thLast Name/th thFirst Name/th thEmail/th thDue/th thWeb Site/th /tr /thead tbody tr tdSmith/td tdJohn/td tdjsm...@gmail.com/td td$50.00/td tdhttp://www.jsmith.com/td /tr tr tdBach/td tdFrank/td tdfb...@yahoo.com/td td$50.00/td tdhttp://www.frank.com/td /tr /tbody /table But, while the table shows up on the page, the sortable features are not visible. NOTE: In Wordpress I have the WP-Table Reloaded plugin activated, but to trouble shoot this issue, I am not using the shortcode and using a HTML table directly in the page, for now. Please advise what I need to do to fix this? Thanks! Amy
[jQuery] Re: Tablesorter is not enabled on my page
I'm pretty sure it's invalid HTML/CSS/whatever to have elements whose IDs start with a number. Trying using a regular name, such as element1. On May 27, 4:03 pm, bayadmin admin.baynet...@gmail.com wrote: Hi GaVrA, per your suggestion I added the # sign to the function and it did not make any difference. On May 27, 12:17 pm, GaVrA ga...@crtaci.info wrote: I think you didnt make selector valid. You need to use them just like you use in css. For instance, you have this: $(1).tablesorter( {sortList: [[0,0], [1,0]]} ); it should be this: $(#1).tablesorter( {sortList: [[0,0], [1,0]]} ); On May 27, 7:26 pm, bayadmin admin.baynet...@gmail.com wrote: Hello, I am trying out the Tablesorter in Wordpress 2.7.1 to make a membership list sortable. For some reason the sortable features isn't being enabled (or at least visible). I need help find the culprit. Here are the steps I've taken so far: 1) In the header.php file I added the following code between the head tags: head script type=text/javascript src=library/scripts/jquery- latest.js/script script type=text/javascript src=library/scripts/ jquery.tablesorter.js/script ?php wp_head(); ? /head (the scripts directory is located at /wp/wp-content/themes/mytheme/ library/scripts/) 2) and in the jquery.tablesorter.js script I added the following code just below the comments at the top: (perhttp://www.nabble.com/Tablesorter-Into-Wordpress-page-td21007774.htm) $(document).ready(function() { $(1).tablesorter( {sortList: [[0,0], [1,0]]} ); } ); (I tried putting this function in the header itself, as whathttp://tablesorter.com/docs/#Getting-Startedseemtobe saying, but this had only the effect of displaying this code on the page itself.) 3) On the page with the table, I used the same sample table fromhttp://tablesorter.com/docs/#Getting-Started, using 1 for the ID. table id=1 thead tr thLast Name/th thFirst Name/th thEmail/th thDue/th thWeb Site/th /tr /thead tbody tr tdSmith/td tdJohn/td tdjsm...@gmail.com/td td$50.00/td tdhttp://www.jsmith.com/td /tr tr tdBach/td tdFrank/td tdfb...@yahoo.com/td td$50.00/td tdhttp://www.frank.com/td /tr /tbody /table But, while the table shows up on the page, the sortable features are not visible. NOTE: In Wordpress I have the WP-Table Reloaded plugin activated, but to trouble shoot this issue, I am not using the shortcode and using a HTML table directly in the page, for now. Please advise what I need to do to fix this? Thanks! Amy
[jQuery] Re: Tablesorter is not enabled on my page
the ID 1 is invalid. See http://www.w3.org/TR/REC-html40/types.html#type-name On May 27, 10:26 am, bayadmin admin.baynet...@gmail.com wrote: Hello, I am trying out the Tablesorter in Wordpress 2.7.1 to make a membership list sortable. For some reason the sortable features isn't being enabled (or at least visible). I need help find the culprit. Here are the steps I've taken so far: 1) In the header.php file I added the following code between the head tags: head script type=text/javascript src=library/scripts/jquery- latest.js/script script type=text/javascript src=library/scripts/ jquery.tablesorter.js/script ?php wp_head(); ? /head (the scripts directory is located at /wp/wp-content/themes/mytheme/ library/scripts/) 2) and in the jquery.tablesorter.js script I added the following code just below the comments at the top: (perhttp://www.nabble.com/Tablesorter-Into-Wordpress-page-td21007774.htm) $(document).ready(function() { $(1).tablesorter( {sortList: [[0,0], [1,0]]} ); } ); (I tried putting this function in the header itself, as whathttp://tablesorter.com/docs/#Getting-Startedseem to be saying, but this had only the effect of displaying this code on the page itself.) 3) On the page with the table, I used the same sample table fromhttp://tablesorter.com/docs/#Getting-Started, using 1 for the ID. table id=1 thead tr thLast Name/th thFirst Name/th thEmail/th thDue/th thWeb Site/th /tr /thead tbody tr tdSmith/td tdJohn/td tdjsm...@gmail.com/td td$50.00/td tdhttp://www.jsmith.com/td /tr tr tdBach/td tdFrank/td tdfb...@yahoo.com/td td$50.00/td tdhttp://www.frank.com/td /tr /tbody /table But, while the table shows up on the page, the sortable features are not visible. NOTE: In Wordpress I have the WP-Table Reloaded plugin activated, but to trouble shoot this issue, I am not using the shortcode and using a HTML table directly in the page, for now. Please advise what I need to do to fix this? Thanks! Amy
[jQuery] Re: Tablesorter is not enabled on my page
You are right Matt. ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens (-), underscores (_), colons (:), and periods (.). http://www.w3.org/TR/REC-html40/types.html#type-name On May 27, 10:08 pm, Matt Brown matt.br...@citrix.com wrote: I'm pretty sure it's invalid HTML/CSS/whatever to have elements whose IDs start with a number. Trying using a regular name, such as element1. On May 27, 4:03 pm, bayadmin admin.baynet...@gmail.com wrote: Hi GaVrA, per your suggestion I added the # sign to the function and it did not make any difference. On May 27, 12:17 pm, GaVrA ga...@crtaci.info wrote: I think you didnt make selector valid. You need to use them just like you use in css. For instance, you have this: $(1).tablesorter( {sortList: [[0,0], [1,0]]} ); it should be this: $(#1).tablesorter( {sortList: [[0,0], [1,0]]} ); On May 27, 7:26 pm, bayadmin admin.baynet...@gmail.com wrote: Hello, I am trying out the Tablesorter in Wordpress 2.7.1 to make a membership list sortable. For some reason the sortable features isn't being enabled (or at least visible). I need help find the culprit. Here are the steps I've taken so far: 1) In the header.php file I added the following code between the head tags: head script type=text/javascript src=library/scripts/jquery- latest.js/script script type=text/javascript src=library/scripts/ jquery.tablesorter.js/script ?php wp_head(); ? /head (the scripts directory is located at /wp/wp-content/themes/mytheme/ library/scripts/) 2) and in the jquery.tablesorter.js script I added the following code just below the comments at the top: (perhttp://www.nabble.com/Tablesorter-Into-Wordpress-page-td21007774.htm) $(document).ready(function() { $(1).tablesorter( {sortList: [[0,0], [1,0]]} ); } ); (I tried putting this function in the header itself, as whathttp://tablesorter.com/docs/#Getting-Startedseemtobesaying, but this had only the effect of displaying this code on the page itself.) 3) On the page with the table, I used the same sample table fromhttp://tablesorter.com/docs/#Getting-Started, using 1 for the ID. table id=1 thead tr thLast Name/th thFirst Name/th thEmail/th thDue/th thWeb Site/th /tr /thead tbody tr tdSmith/td tdJohn/td tdjsm...@gmail.com/td td$50.00/td tdhttp://www.jsmith.com/td /tr tr tdBach/td tdFrank/td tdfb...@yahoo.com/td td$50.00/td tdhttp://www.frank.com/td /tr /tbody /table But, while the table shows up on the page, the sortable features are not visible. NOTE: In Wordpress I have the WP-Table Reloaded plugin activated, but to trouble shoot this issue, I am not using the shortcode and using a HTML table directly in the page, for now. Please advise what I need to do to fix this? Thanks! Amy