[jQuery] Re: Click Links in the Nnavigation Bar
Thanks Karl , You are Right , I appreciate it , thank you again . You are always the solver On Jan 31, 11:54 am, Karl Swedberg k...@englishrules.com wrote: Hi Pedram, I agree with Nic. Especially if you're only dealing with 4 elements, binding directly on them seems like the most sensible solution. Are you noticing performance problems? You shouldn't be seeing any, with scripts this basic. In any case, there are a couple selector optimizations you could implement, if necessary. Something like this: var $navBarLinks = $('#your-nav-bar-id a'); $navBarLinks.click(function() { $navBarLinks.removeClass('active'); $(this).addClass('active'); }); --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On Jan 31, 2009, at 2:36 PM, Pedram wrote: I'm looking to improve the performance , which of these 2 codes has the best performance. On Jan 30, 1:04 am, Nic Luciano adaptive...@gmail.com wrote: What exactly are you trying to do, what is the issue? Maybe just preference here (and I'm also just guessing what you're asking) but I don't see a reason not to put the events on the elements themselves $(ul li a).click(function() { $ (this).parent().parent().find(.active).removeClass(active); $(this).addClass(active); }); On Fri, Jan 30, 2009 at 3:07 AM, Pedram pedram...@gmail.com wrote: Dear Karl , I know You are Expert in these Issues do you have any idea for me Thanks On Jan 29, 5:44 pm, Pedram pedram...@gmail.com wrote: Hi Folks , I have some links in my Navigation bar such as below , I Used FIND in my code , does anyone has any better solution for me , I also used Event Delegation in the system . ul lia href=# class=activea/a/li lia href=#b/a/li lia href=#c/a/li lia href=#d/a/li /ul $(ul).bind(click,function(e){ var clicked=$(e.target); $(this).find(a.active).removeClass(active); clicked.addClass(active); });
[jQuery] Re: Click Links in the Nnavigation Bar
I just had some Doubt , the performance is great On Jan 31, 11:54 am, Karl Swedberg k...@englishrules.com wrote: Hi Pedram, I agree with Nic. Especially if you're only dealing with 4 elements, binding directly on them seems like the most sensible solution. Are you noticing performance problems? You shouldn't be seeing any, with scripts this basic. In any case, there are a couple selector optimizations you could implement, if necessary. Something like this: var $navBarLinks = $('#your-nav-bar-id a'); $navBarLinks.click(function() { $navBarLinks.removeClass('active'); $(this).addClass('active'); }); --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On Jan 31, 2009, at 2:36 PM, Pedram wrote: I'm looking to improve the performance , which of these 2 codes has the best performance. On Jan 30, 1:04 am, Nic Luciano adaptive...@gmail.com wrote: What exactly are you trying to do, what is the issue? Maybe just preference here (and I'm also just guessing what you're asking) but I don't see a reason not to put the events on the elements themselves $(ul li a).click(function() { $ (this).parent().parent().find(.active).removeClass(active); $(this).addClass(active); }); On Fri, Jan 30, 2009 at 3:07 AM, Pedram pedram...@gmail.com wrote: Dear Karl , I know You are Expert in these Issues do you have any idea for me Thanks On Jan 29, 5:44 pm, Pedram pedram...@gmail.com wrote: Hi Folks , I have some links in my Navigation bar such as below , I Used FIND in my code , does anyone has any better solution for me , I also used Event Delegation in the system . ul lia href=# class=activea/a/li lia href=#b/a/li lia href=#c/a/li lia href=#d/a/li /ul $(ul).bind(click,function(e){ var clicked=$(e.target); $(this).find(a.active).removeClass(active); clicked.addClass(active); });
[jQuery] Re: Click Links in the Nnavigation Bar
I have another tiny question $(Ul li a), $(ul a), $(a,$(ul)) which one has the great performance !!? On Feb 1, 12:02 am, Pedram pedram...@gmail.com wrote: I just had some Doubt , the performance is great On Jan 31, 11:54 am, Karl Swedberg k...@englishrules.com wrote: Hi Pedram, I agree with Nic. Especially if you're only dealing with 4 elements, binding directly on them seems like the most sensible solution. Are you noticing performance problems? You shouldn't be seeing any, with scripts this basic. In any case, there are a couple selector optimizations you could implement, if necessary. Something like this: var $navBarLinks = $('#your-nav-bar-id a'); $navBarLinks.click(function() { $navBarLinks.removeClass('active'); $(this).addClass('active'); }); --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On Jan 31, 2009, at 2:36 PM, Pedram wrote: I'm looking to improve the performance , which of these 2 codes has the best performance. On Jan 30, 1:04 am, Nic Luciano adaptive...@gmail.com wrote: What exactly are you trying to do, what is the issue? Maybe just preference here (and I'm also just guessing what you're asking) but I don't see a reason not to put the events on the elements themselves $(ul li a).click(function() { $ (this).parent().parent().find(.active).removeClass(active); $(this).addClass(active); }); On Fri, Jan 30, 2009 at 3:07 AM, Pedram pedram...@gmail.com wrote: Dear Karl , I know You are Expert in these Issues do you have any idea for me Thanks On Jan 29, 5:44 pm, Pedram pedram...@gmail.com wrote: Hi Folks , I have some links in my Navigation bar such as below , I Used FIND in my code , does anyone has any better solution for me , I also used Event Delegation in the system . ul lia href=# class=activea/a/li lia href=#b/a/li lia href=#c/a/li lia href=#d/a/li /ul $(ul).bind(click,function(e){ var clicked=$(e.target); $(this).find(a.active).removeClass(active); clicked.addClass(active); });
[jQuery] 'JQuery' tag is not working at all
Hi! Iam using JQuery 1.3. $ tag is working fine. But when I try to use jquery plugin'jqGrid'. It gives error. As I think, this plugin is using 'JQuery' and my system is not recognising this tag [JQuery]. Following is the error, generated by Firebug. jQuery(modwin).jqDrag is not a function http://localhost/main/vibersol/shipping/main/js/jqGrid/grid.common.js Line 66 Can some one guide me, how to solve this problem. NOTE: Iam running default example of JQGRID. Thanks in advance
[jQuery] Re: Damn ie7!
And for some common CSS bugs check: http://positioniseverything.net/ --Klaus On 1 Feb., 00:31, Karl Swedberg k...@englishrules.com wrote: On Jan 30, 2009, at 5:06 PM, david.0pl...@gmail.com wrote: Ok, thank you very much i got this! Also, just to know is there any site/books that specifically 'speaks' about the limitations of the various web browsers? Yes, check out PPK's Quirksmode athttp://www.quirksmode.org/ --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com
[jQuery] Re: 'JQuery' tag is not working at all
Hi! This is continuation of my previous message. I also get following error in FireBug. JQuery(document).ready(function(){ JQuery is not defined http://localhost/main/vibersol/shipping/admin/country.php Line 132 Thanks On Feb 1, 1:32 pm, Bluesapphire michealg...@gmail.com wrote: Hi! Iam using JQuery 1.3. $ tag is working fine. But when I try to use jquery plugin'jqGrid'. It gives error. As I think, this plugin is using 'JQuery' and my system is not recognising this tag [JQuery]. Following is the error, generated by Firebug. jQuery(modwin).jqDrag is not a functionhttp://localhost/main/vibersol/shipping/main/js/jqGrid/grid.common.js Line 66 Can some one guide me, how to solve this problem. NOTE: Iam running default example of JQGRID. Thanks in advance
[jQuery] UNSUBSCRIBE
[jQuery] Re: 'JQuery' tag is not working at all
it should be jQuery little 'j', capital 'Q', little 'uery Don't you just hate those typos? On Feb 1, 12:53 am, Bluesapphire michealg...@gmail.com wrote: Hi! This is continuation of my previous message. I also get following error in FireBug. JQuery(document).ready(function(){ JQuery is not definedhttp://localhost/main/vibersol/shipping/admin/country.php Line 132 Thanks On Feb 1, 1:32 pm, Bluesapphire michealg...@gmail.com wrote: Hi! Iam using JQuery 1.3. $ tag is working fine. But when I try to use jquery plugin'jqGrid'. It gives error. As I think, this plugin is using 'JQuery' and my system is not recognising this tag [JQuery]. Following is the error, generated by Firebug. jQuery(modwin).jqDrag is not a functionhttp://localhost/main/vibersol/shipping/main/js/jqGrid/grid.common.js Line 66 Can some one guide me, how to solve this problem. NOTE: Iam running default example of JQGRID. Thanks in advance
[jQuery] Image rollover effects in Superfish menu
We have built our site using superfish to handle the main navigation menu. The top level elements are images and for selecting the 'current section image, we use the codebehind to set the different image states, and a rollover function in the client side to handle the image rollovers. That gives us for example: server-side: home.png (standard menu image) home-current.png (current section) client-side: home_o.png (over state) home-current_o.png (current section / over state) The only drawback I have right now is that the hover (over) states show properly when you hover over the top-menu element itself. If you hover in the sub-menu then the roll-over effect on the top-level menu image disappears. Has anyone had any success in using rollover images in a superfish menu, and how would I fix this?
[jQuery] Re: jQuery and Javascript timer question
It's being ran from perl, so when perl is parsing the print statement, it thinks $~whatever is a perl variable. Which is strange, because normally use strict; will bark at you, but instead perl finds a way to find out what $~whatever is. Its kinda strange, so I have to escape them server side, but client side they come out as normal $ On Jan 31, 10:54 pm, brian bally.z...@gmail.com wrote: On Sat, Jan 31, 2009 at 11:19 PM, thertze...@gmail.com thertze...@gmail.com wrote: \$(this).css({ backgroundColor:color }); never seem to fire, as far as I know though, its valid jquery javascript... As for the statement above (input#color_code).val() is whatever the user selects from the color picker. If anyone is questioning my \$ in my javascript, i have to do it this way, because I'm running this with a Perl script, and perl uses $ to define and use variables. Using the backslash within a Perl script which writes your javascript, I can well understand. But the output--what the JS interpreter sees--should be a bare $, not \$. In any case, why not just use jQuery.noConflict()?
[jQuery] Re: Changing Tooltip style
Your tooltip text will actually show up within an h3 tag wrapped inside the #tooltip div. Keep your #tooltip styles the way they were (without the font-size property), and set up a new one like this: #tooltip h3 { font: normal 10px Verdana; margin: 0; padding: 6px 2px } (or whatever suits your needs) Good luck! Matt On Jan 31, 5:37 pm, apple quye...@yahoo.com wrote: Hi, I would like to change the tooltip style: making the font smaller with a different color ; I tried changing the tooltip.css but it seems not to work... #tooltip { position: absolute; z-index: 3000; background-color: #eee; padding: 5px; font-size:small; - opacity: 0.85; } Please advice. Thanks in advance
[jQuery] Re: Need help validating a dropdown list
Dropdowns are supported just fine. Just remove the value attribute from the select one option and add a required rule for the field. See also http://jquery.bassistance.de/validate/demo/radio-checkbox-select-demo.html Jörn On Sat, Jan 31, 2009 at 7:59 PM, Kathryn kathry...@gmail.com wrote: Hi all, I'm using the fantastic validation plugin (from bassistance.de) and have run into a little glitch. I understand the plugin doesn't currently handle dropdowns, but I found a possible solution on True Tribe (http://www.thetruetribe.com/jquery/1-jquery-api/68-jquery- plugin-validation-with-ajax). I can't get it to work, though. I'm pretty new to jQuery and am probably making an obvious error I can't see. Here's my jQuery code: $(document).ready(function(){ $(#reg_form).validate({ onfocusout: false, onkeyup: false, onclick: false, rules: { gender: {required:true}, spouse_attend: {required:true} } }); $validator.addMethod( select_class, function(value, element) { return this.optional(element) || ( value.indexOf(--Select One--) == -1); }, Please select a class.); }); And here's the dropdown I'm trying to validate. select name='class_date' id='class_date' class='select_class' option value='--Select One--'--Select One--/option optionFeb 16 - 20, 2009/option optionMar 16 - 20, 2009/option optionApr 13 - 17, 2009/option optionMay 11 - 15, 2009/option /select What am I doing wrong? Or is there another way to do this? Thanks in advance! Kathryn
[jQuery] Re: BlockUI: multiple blocks
data in the table. What I'd really like to do is block user input on the entire page but only draw the overlay and message on the table portion. What's the best way to do this? Can I block the div as I am now and still call $.blockUI with no message in order to block input to the entire page Yes, you can do that. To block the page without a message and without the overlay try this: $.blockUI({ message: null, overlayCSS: { opacity: 0 } });
[jQuery] about :not(:last)
Hi! Please, consider this code: $.fn.url2 = function(absoluta) { var slots = $(this).parents('dl:not(:last)').map(function() { return $(.Texto:first, $(this)).text(); }); var slots2 = $(this).parents('dl').map(function() { return $(.Texto:first, $(this)).text(); }); return slots.get().join(/) + ' -- ' + slots2.get().join(/); }; The funny thing of this code is that slots and slots2 have the same items Could you point me why slots put the last dl? I suppose that dl:not(:last) retrieves all the parents except the last one but this don't work Thanks!
[jQuery] Re: jQuery and Javascript timer question
are you putting that code inside $(document).ready? if ( \$(e.target).is('.btn px') ) is checking if the clicked element is a px/ element inside .btn, that condition will never be satisfied, will it? On Feb 1, 12:38 pm, thertze...@gmail.com thertze...@gmail.com wrote: It's being ran from perl, so when perl is parsing the print statement, it thinks $~whatever is a perl variable. Which is strange, because normally use strict; will bark at you, but instead perl finds a way to find out what $~whatever is. Its kinda strange, so I have to escape them server side, but client side they come out as normal $ On Jan 31, 10:54 pm, brian bally.z...@gmail.com wrote: On Sat, Jan 31, 2009 at 11:19 PM, thertze...@gmail.com thertze...@gmail.com wrote: \$(this).css({ backgroundColor:color }); never seem to fire, as far as I know though, its valid jquery javascript... As for the statement above (input#color_code).val() is whatever the user selects from the color picker. If anyone is questioning my \$ in my javascript, i have to do it this way, because I'm running this with a Perl script, and perl uses $ to define and use variables. Using the backslash within a Perl script which writes your javascript, I can well understand. But the output--what the JS interpreter sees--should be a bare $, not \$. In any case, why not just use jQuery.noConflict()?
[jQuery] Re: Problem with dynamic XML
It's easy, see this thread: http://groups.google.com/group/jquery-en/browse_frm/thread/95718c9aab2c7483/af37adcb54b816c3?lnk=gstq=parsexml#af37adcb54b816c3 On Feb 1, 5:56 am, pp...@fragrance-world.net fragrance2...@gmail.com wrote: I have the following code: var cartXml = $(datacarttotalsitems33/items/carttotals/ data); alert(cartXml.find(items).text()); this will spit out 33 in both safari and firefox However in IE it does not produce anything Here is what I have figured out so far: if I change to the following: alert($(divspanp33/items/span/p).find(p).text()); this works in IE, Safari, and firefox it seems with IE you need to use real html tag names and not ones that are made up. Does anyone know how I can fix this?
[jQuery] Re: Superfish Dropdown BG Problem
Thanks for the heads up on turning off the call. However, I still don't have any idea of where to put the code that Joel is talking about. Does this go into the Rhuk_milkyway css file??? Regards, Ron On Feb 1, 2:22 am, bklyn2cali s...@mediajelly.com wrote: Joel, I've got this working now, thank you. One last issue: the SuperSubs plugin works only on the first sub-sub- nav. I'm not sure why.http://www.stcyril.net/site/ It seems like there is some overflow issue since the background repeats all the way to the edge of the border. I'm so close to getting this done, just this issue, and also more minor is that the dropshadow no longer appears. Thanks for your help. It is much appreciated. Sean On Jan 31, 6:08 am, Joel Birch joeldbi...@gmail.com wrote: Hello, This is the exact same issue someone else had just the other day, and they were also a Joomla user. Your problem is figure out by selecting the menu li element using Firebug. The Superfish background rule is being overridden by the #pillmenu li li rule which is in the green.css file. The reason this rule gets precedence over the Superfish CSS is because it uses an id in the selector, which trumps the .sf-menu class selector. Interestingly, 'pillmenu' was the exact same id that was involved with the other Joomla user's issue, so I assume it must be part of Joomla's templates. Solve your problem by adding the id to your Superfish selector in order to increase its 'specificity', like this: #pillmenu .sf-menu li { background: #BDD2FF url('../images/ normal_bg.png') repeat-x 0 0; } Joel Birch.
[jQuery] Re: Cascade (chained) works in Firefox but not in IE
@Mike Thanks. But it should have been working with the default code since dropdown 2 was working - dropdown 3 used the exact same principle. There is definitely something going on different between FF and IE. Question - Could the existence of single quotes within the JSON data throw off JQuery? example: If one of the cities is O'Brien I ask because I have now put up a refined page with the two methods and I have used a smaller version of the data file and guess what? It now works. So this leads me to believe the JSON data itself may have been causing a problem with IE only (Firefox always worked). http://jamestilberg.com/jquery/ The thing is, I had already validated the JSON data with several different online JSON validators I guess I need to build the JSON file back up and see if something specific stumps JQuery... On Feb 1, 2:01 am, Mike Nichols nichols.mik...@gmail.com wrote: @James Thinking about what you are doing here with the third dropdown...By attaching that dropdown to the second you are telling it to be filtered by the second dropdown's selected value...which is not selected yet since it just loaded so I would presume you shouldn't have any data in the third drop down. To support this behavior in the past I used the 'event' property of the options to define which event actually fires a cascade ( the defalt is 'changed'). Then I manually fire cascade within the parent element's change handler. : //when 'make' is selected... $(.seconddropdown) .cascade(.firstdropdown,{ ajax: 'firsturl.js' }) .bind(change,function() { $(this).trigger(custom.changed);//manually call cascade }); $(.thirddropdown) .cascade(.secondbehavior,{ event : custom.changed,//bind to custom event to prevent loading from cascade ajax: 'secondurl.js', }); On Jan 31, 4:39 pm, James james.tilb...@gmail.com wrote: I am new to JQuery and your cascading dropdown was exactly what I was looking for. After formatting my data in JSON I have tested out the Chained example (http://dev.chayachronicles.com/jquery/cascade/ index.html) and it ONLY WORKS in Firefox and NOT IE. I am attempting to load the data from two external files, while your example loads the second data set from a static var. Is there a further step necessary to get this to work in IE? I have my working example at:http://jamestilberg.com/jquery/ Any help would be appreciated! :)
[jQuery] Problem with dynamic XML
I have the following code: var cartXml = $(datacarttotalsitems33/items/carttotals/ data); alert(cartXml.find(items).text()); this will spit out 33 in both safari and firefox However in IE it does not produce anything Here is what I have figured out so far: if I change to the following: alert($(divspanp33/items/span/p).find(p).text()); this works in IE, Safari, and firefox it seems with IE you need to use real html tag names and not ones that are made up. Does anyone know how I can fix this?
[jQuery] Re: $(this).ready with images
Unfortunately it's not that simple, thanks to IE: http://groups.google.com/group/jquery-dev/browse_thread/thread/24b107e84adeaaee/ http://dev.jquery.com/ticket/3930 On Jan 31, 4:20 pm, frederik.r...@gmail.com frederik.r...@gmail.com wrote: Ok! That's great! Thanks for the explanation!
[jQuery] Re: Superfish Dropdown BG Problem
Joel, I've got this working now, thank you. One last issue: the SuperSubs plugin works only on the first sub-sub- nav. I'm not sure why. http://www.stcyril.net/site/ It seems like there is some overflow issue since the background repeats all the way to the edge of the border. I'm so close to getting this done, just this issue, and also more minor is that the dropshadow no longer appears. Thanks for your help. It is much appreciated. Sean On Jan 31, 6:08 am, Joel Birch joeldbi...@gmail.com wrote: Hello, This is the exact same issue someone else had just the other day, and they were also a Joomla user. Your problem is figure out by selecting the menu li element using Firebug. The Superfish background rule is being overridden by the #pillmenu li li rule which is in the green.css file. The reason this rule gets precedence over the Superfish CSS is because it uses an id in the selector, which trumps the .sf-menu class selector. Interestingly, 'pillmenu' was the exact same id that was involved with the other Joomla user's issue, so I assume it must be part of Joomla's templates. Solve your problem by adding the id to your Superfish selector in order to increase its 'specificity', like this: #pillmenu .sf-menu li { background: #BDD2FF url('../images/ normal_bg.png') repeat-x 0 0; } Joel Birch.
[jQuery] Clickable slideshow not working as expected.
Using the hover function, I'm showing a before/after version of a photo (I have 2 photos stacked using z-index): $(function() { $('.current img.after').hover( function() { $(this).animate({opacity: 0}); }, function() { $(this).animate({opacity: 1}); }); When an image is clicked it proceeds to the next image, using the removeClass and addClass functions: $('.current').click(function() { $(this).removeClass('current').addClass('invisible'); $(this).next('div').removeClass('invisible').addClass ('current'); }); This works fine, but after clicking I lose the hover function. Not sure why... Here's a bare-bones example: http://adamkobrin.com/retouchBA2.html Thanks.
[jQuery] Problems understanding jQueryUI and Dialogs
Ok, I'm probably missing the obvious here, but I'm having a very difficult time understanding how to use a jQuery UI dialog with a simple theme. First off, I began with the following code: html head script src=js/jquery.js/script script src=js/ui/ui.core.js/script script src=js/ui/ui.dialog.js/script script function showDialog(){ $(#example).dialog(); return false; } /script /head body p a href= onclick=return showDialog()Show the Dialog/a /p div id=example class=flora title=This is my titleI'm in a dialog!/div /body /html This is a small modification of the code here: http://docs.jquery.com/UI/Dialog All I changed was switching from the document ready code to showDialog so I could manually load the dialog. This works, but the dialog is visible on page load. I would have assumed that would be something the basic docs would cover. I had to dig a bit and finally found that I would just hide it with CSS: div style=display: none; id=example class=flora title=This is my titleI'm in a dialog!/div Ok, so no big deal, but why didn't the basic demo mention this? I'm still a bit rough w/ CSS so if I had not found this on some other demo, I would have been out of luck. Anyway, at this point it works, but it has no skin at all. I went on to the dialog theming page (http://docs.jquery.com/UI/Dialog/Theming), and it showed this example: div class=ui-dialog ui-widget ui-widget-content ui-corner-all undefined ui-draggable ui-resizable div class=ui-dialog-titlebar ui-widget-header ui-corner-all ui- helper-clearfix span id=ui-dialog-title-dialog class=ui-dialog-titleDialog title/span a class=ui-dialog-titlebar-close ui-corner-all href=#span class=ui-icon ui-icon-closethickclose/span/a /div div style=height: 200px; min-height: 109px; width: auto; class=ui-dialog-content ui-widget-content id=dialog pDialog content goes here./p /div /div So I replaced my div with that code. Right away I see that the dialog is no longer hidden. Ok, no big deal, I can fix that later I assume. There is no ID on the div though so I have no way of showing it. I added id=example to the top level div: div class=ui-dialog ui-widget ui-widget-content ui-corner-all undefined ui-draggable ui-resizable id=example Now when I click on the link to show the dialog, it does pop the dialog up, but with multiple title bars. Well, one title, but 2 Xs. Almost like jquery re-wrapped the div. There is a thick white border around the item. I'm pretty frustrated. I've looked around at the demos and docs, but I can't seem to find a very simple _minimal_ example. Any help please?
[jQuery] Guidelines on Graceful Degradation When JavaScript Disabled?
I'm new to jQuery so I apologize if this is a dumb question. I'd like to take advantage of the visually interesting things jQuery can do. But I'm bumping into a small but significant number of end users who either have JavaScript disabled or are running old browsers with bad JS support. Since I want to provide at least a decent experience for all site visitors, I'm wondering if there are any guidelines, suggestions, or tips on how to build a web page so whatever's being done via jQuery still works and looks OK if JavaScript isn't coming along for the ride. Thanks!
[jQuery] prototip-like script for jQuery
Hi, is there any jQuery script similar to ProtoTip ? I need a script that shows the hint which doesn't move when the mouse is moved and doesn't disappear if the mouse is over the shown hint...
[jQuery] Re: Cascade (chained) works in Firefox but not in IE
Update: It doesn't seem to have anything to do with single quotes or commas, for that matter, inside the JSON data. Now HERE'S something to make you scratch your head: I have now put the complete data file back up in the external file ('CANADA_3.js') and I have ALSO put the EXACT same data file into the static var included inline in the HTML page ('list3'). This is the best demonstration of the problem: The external file and the static var both load fine if using Firefox. Only the static var works for IE. Live page (will not change until further response): http://jamestilberg.com/jquery/ James ? On Feb 1, 11:22 am, James james.tilb...@gmail.com wrote: @Mike Thanks. But it should have been working with the default code since dropdown 2 was working - dropdown 3 used the exact same principle. There is definitely something going on different between FF and IE. Question - Could the existence of single quotes within the JSON data throw off JQuery? example: If one of the cities is O'Brien I ask because I have now put up a refined page with the two methods and I have used a smaller version of the data file and guess what? It now works. So this leads me to believe the JSON data itself may have been causing a problem with IE only (Firefox always worked). http://jamestilberg.com/jquery/ The thing is, I had already validated the JSON data with several different online JSON validators I guess I need to build the JSON file back up and see if something specific stumps JQuery... On Feb 1, 2:01 am, Mike Nichols nichols.mik...@gmail.com wrote: @James Thinking about what you are doing here with the third dropdown...By attaching that dropdown to the second you are telling it to be filtered by the second dropdown's selected value...which is not selected yet since it just loaded so I would presume you shouldn't have any data in the third drop down. To support this behavior in the past I used the 'event' property of the options to define which event actually fires a cascade ( the defalt is 'changed'). Then I manually fire cascade within the parent element's change handler. : //when 'make' is selected... $(.seconddropdown) .cascade(.firstdropdown,{ ajax: 'firsturl.js' }) .bind(change,function() { $(this).trigger(custom.changed);//manually call cascade }); $(.thirddropdown) .cascade(.secondbehavior,{ event : custom.changed,//bind to custom event to prevent loading from cascade ajax: 'secondurl.js', }); On Jan 31, 4:39 pm, James james.tilb...@gmail.com wrote: I am new to JQuery and your cascading dropdown was exactly what I was looking for. After formatting my data in JSON I have tested out the Chained example (http://dev.chayachronicles.com/jquery/cascade/ index.html) and it ONLY WORKS in Firefox and NOT IE. I am attempting to load the data from two external files, while your example loads the second data set from a static var. Is there a further step necessary to get this to work in IE? I have my working example at:http://jamestilberg.com/jquery/ Any help would be appreciated! :)
[jQuery] Re: Superfish Dropdown BG Problem
Ron, That code goes into whatever file you have your superfish css in - normally superfish.css. In there you will probably find the line: .sf-menu li { background: #BDD2FF url('../images/ normal_bg.png') repeat-x 0 0; } or similar - at least the .sf-menu li {} should be there. Prepend that line with the id of your element (#pillmenu) and it should look something like this: #pillmenu .sf-menu li { background: #BDD2FF url('../images/ normal_bg.png') repeat-x 0 0; } I think =) Regards, Mickster On Feb 1, 4:59 pm, levine@gmail.com levine@gmail.com wrote: Thanks for the heads up on turning off the call. However, I still don't have any idea of where to put the code that Joel is talking about. Does this go into the Rhuk_milkyway css file??? Regards, Ron On Feb 1, 2:22 am, bklyn2cali s...@mediajelly.com wrote: Joel, I've got this working now, thank you. One last issue: the SuperSubs plugin works only on the first sub-sub- nav. I'm not sure why.http://www.stcyril.net/site/ It seems like there is some overflow issue since the background repeats all the way to the edge of the border. I'm so close to getting this done, just this issue, and also more minor is that the dropshadow no longer appears. Thanks for your help. It is much appreciated. Sean On Jan 31, 6:08 am, Joel Birch joeldbi...@gmail.com wrote: Hello, This is the exact same issue someone else had just the other day, and they were also a Joomla user. Your problem is figure out by selecting the menu li element using Firebug. The Superfish background rule is being overridden by the #pillmenu li li rule which is in the green.css file. The reason this rule gets precedence over the Superfish CSS is because it uses an id in the selector, which trumps the .sf-menu class selector. Interestingly, 'pillmenu' was the exact same id that was involved with the other Joomla user's issue, so I assume it must be part of Joomla's templates. Solve your problem by adding the id to your Superfish selector in order to increase its 'specificity', like this: #pillmenu .sf-menu li { background: #BDD2FF url('../images/ normal_bg.png') repeat-x 0 0; } Joel Birch.
[jQuery] Re: Problems understanding jQueryUI and Dialogs
Hide it with autoOpen:false, style=display: none is unnecessary Think jQuery, not Javascript ! On 1 fév, 16:56, Raymond Camden rcam...@gmail.com wrote: Ok, I'm probably missing the obvious here, but I'm having a very difficult time understanding how to use a jQuery UI dialog with a simple theme. First off, I began with the following code: html head script src=js/jquery.js/script script src=js/ui/ui.core.js/script script src=js/ui/ui.dialog.js/script script function showDialog(){ $(#example).dialog(); return false;} /script /head body p a href= onclick=return showDialog()Show the Dialog/a /p div id=example class=flora title=This is my titleI'm in a dialog!/div /body /html This is a small modification of the code here:http://docs.jquery.com/UI/Dialog All I changed was switching from the document ready code to showDialog so I could manually load the dialog. This works, but the dialog is visible on page load. I would have assumed that would be something the basic docs would cover. I had to dig a bit and finally found that I would just hide it with CSS: div style=display: none; id=example class=flora title=This is my titleI'm in a dialog!/div Ok, so no big deal, but why didn't the basic demo mention this? I'm still a bit rough w/ CSS so if I had not found this on some other demo, I would have been out of luck. Anyway, at this point it works, but it has no skin at all. I went on to the dialog theming page (http://docs.jquery.com/UI/Dialog/Theming), and it showed this example: div class=ui-dialog ui-widget ui-widget-content ui-corner-all undefined ui-draggable ui-resizable div class=ui-dialog-titlebar ui-widget-header ui-corner-all ui- helper-clearfix span id=ui-dialog-title-dialog class=ui-dialog-titleDialog title/span a class=ui-dialog-titlebar-close ui-corner-all href=#span class=ui-icon ui-icon-closethickclose/span/a /div div style=height: 200px; min-height: 109px; width: auto; class=ui-dialog-content ui-widget-content id=dialog pDialog content goes here./p /div /div So I replaced my div with that code. Right away I see that the dialog is no longer hidden. Ok, no big deal, I can fix that later I assume. There is no ID on the div though so I have no way of showing it. I added id=example to the top level div: div class=ui-dialog ui-widget ui-widget-content ui-corner-all undefined ui-draggable ui-resizable id=example Now when I click on the link to show the dialog, it does pop the dialog up, but with multiple title bars. Well, one title, but 2 Xs. Almost like jquery re-wrapped the div. There is a thick white border around the item. I'm pretty frustrated. I've looked around at the demos and docs, but I can't seem to find a very simple _minimal_ example. Any help please?
[jQuery] Re: Superfish Dropdown BG Problem
Also, where do I find the font color for the menu? I have looked in the RM css files as well as the SF css files and can't seem to make out where it is. Thanks again, Ron On Feb 1, 7:59 am, levine@gmail.com levine@gmail.com wrote: Thanks for the heads up on turning off the call. However, I still don't have any idea of where to put the code that Joel is talking about. Does this go into the Rhuk_milkyway css file??? Regards, Ron On Feb 1, 2:22 am, bklyn2cali s...@mediajelly.com wrote: Joel, I've got this working now, thank you. One last issue: the SuperSubs plugin works only on the first sub-sub- nav. I'm not sure why.http://www.stcyril.net/site/ It seems like there is some overflow issue since the background repeats all the way to the edge of the border. I'm so close to getting this done, just this issue, and also more minor is that the dropshadow no longer appears. Thanks for your help. It is much appreciated. Sean On Jan 31, 6:08 am, Joel Birch joeldbi...@gmail.com wrote: Hello, This is the exact same issue someone else had just the other day, and they were also a Joomla user. Your problem is figure out by selecting the menu li element using Firebug. The Superfish background rule is being overridden by the #pillmenu li li rule which is in the green.css file. The reason this rule gets precedence over the Superfish CSS is because it uses an id in the selector, which trumps the .sf-menu class selector. Interestingly, 'pillmenu' was the exact same id that was involved with the other Joomla user's issue, so I assume it must be part of Joomla's templates. Solve your problem by adding the id to your Superfish selector in order to increase its 'specificity', like this: #pillmenu .sf-menu li { background: #BDD2FF url('../images/ normal_bg.png') repeat-x 0 0; } Joel Birch.
[jQuery] Re: jQuery and Javascript timer question
what? That statement checks to see if the element clicked has the class of .btn px, I dont know what your saying, the statement there does work correctly, its \$(this).css({ backgroundColor:color }); that isnt modifying the css, thats where my problems are. On Feb 1, 9:29 am, Ricardo Tomasi ricardob...@gmail.com wrote: are you putting that code inside $(document).ready? if ( \$(e.target).is('.btn px') ) is checking if the clicked element is a px/ element inside .btn, that condition will never be satisfied, will it? On Feb 1, 12:38 pm, thertze...@gmail.com thertze...@gmail.com wrote: It's being ran from perl, so when perl is parsing the print statement, it thinks $~whatever is a perl variable. Which is strange, because normally use strict; will bark at you, but instead perl finds a way to find out what $~whatever is. Its kinda strange, so I have to escape them server side, but client side they come out as normal $ On Jan 31, 10:54 pm, brian bally.z...@gmail.com wrote: On Sat, Jan 31, 2009 at 11:19 PM, thertze...@gmail.com thertze...@gmail.com wrote: \$(this).css({ backgroundColor:color }); never seem to fire, as far as I know though, its valid jquery javascript... As for the statement above (input#color_code).val() is whatever the user selects from the color picker. If anyone is questioning my \$ in my javascript, i have to do it this way, because I'm running this with a Perl script, and perl uses $ to define and use variables. Using the backslash within a Perl script which writes your javascript, I can well understand. But the output--what the JS interpreter sees--should be a bare $, not \$. In any case, why not just use jQuery.noConflict()?
[jQuery] Re: Cascade (chained) works in Firefox but not in IE
Update2: The problematic page is still up as promised for discussion purposes, but I have a breakthrough to report. I never would have suspected this in a million years, but I discovered it after following through with my same line of logic regarding the JSON data causing a problem. I eliminated single quotes and commas from the equation as these worked just fine. However, I thought I would try other characters since I noticed that accented characters were showing up strangely in the dropdown list (see under Quebec - Gaspé, for an example). Where it should say GASPé, it instead shows GASP(question mark inside a diamond). Firefox displays this, IE doesn't display anything but the loading circle graphic. I can fix this by replacing all accented characters in my data with regular alphabet characters, but the question is - why is this causing a problem with the JQuery/IE combination? I would much rather leave accented characters intact. Something in the JQuery routines can't handle these characters and/or is replacing them with a strange character. Any ideas? On Feb 1, 11:46 am, James james.tilb...@gmail.com wrote: Update: It doesn't seem to have anything to do with single quotes or commas, for that matter, inside the JSON data. Now HERE'S something to make you scratch your head: I have now put the complete data file back up in the external file ('CANADA_3.js') and I have ALSO put the EXACT same data file into the static var included inline in the HTML page ('list3'). This is the best demonstration of the problem: The external file and the static var both load fine if using Firefox. Only the static var works for IE. Live page (will not change until further response):http://jamestilberg.com/jquery/ James ? On Feb 1, 11:22 am, James james.tilb...@gmail.com wrote: @Mike Thanks. But it should have been working with the default code since dropdown 2 was working - dropdown 3 used the exact same principle. There is definitely something going on different between FF and IE. Question - Could the existence of single quotes within the JSON data throw off JQuery? example: If one of the cities is O'Brien I ask because I have now put up a refined page with the two methods and I have used a smaller version of the data file and guess what? It now works. So this leads me to believe the JSON data itself may have been causing a problem with IE only (Firefox always worked). http://jamestilberg.com/jquery/ The thing is, I had already validated the JSON data with several different online JSON validators I guess I need to build the JSON file back up and see if something specific stumps JQuery... On Feb 1, 2:01 am, Mike Nichols nichols.mik...@gmail.com wrote: @James Thinking about what you are doing here with the third dropdown...By attaching that dropdown to the second you are telling it to be filtered by the second dropdown's selected value...which is not selected yet since it just loaded so I would presume you shouldn't have any data in the third drop down. To support this behavior in the past I used the 'event' property of the options to define which event actually fires a cascade ( the defalt is 'changed'). Then I manually fire cascade within the parent element's change handler. : //when 'make' is selected... $(.seconddropdown) .cascade(.firstdropdown,{ ajax: 'firsturl.js' }) .bind(change,function() { $(this).trigger(custom.changed);//manually call cascade }); $(.thirddropdown) .cascade(.secondbehavior,{ event : custom.changed,//bind to custom event to prevent loading from cascade ajax: 'secondurl.js', }); On Jan 31, 4:39 pm, James james.tilb...@gmail.com wrote: I am new to JQuery and your cascading dropdown was exactly what I was looking for. After formatting my data in JSON I have tested out the Chained example (http://dev.chayachronicles.com/jquery/cascade/ index.html) and it ONLY WORKS in Firefox and NOT IE. I am attempting to load the data from two external files, while your example loads the second data set from a static var. Is there a further step necessary to get this to work in IE? I have my working example at:http://jamestilberg.com/jquery/ Any help would be appreciated! :)
[jQuery] Re: Problems understanding jQueryUI and Dialogs
On Sun, Feb 1, 2009 at 11:57 AM, phicarre gam...@bluewin.ch wrote: Hide it with autoOpen:false, style=display: none is unnecessary Think jQuery, not Javascript ! Actually, autoOpen: false won't hide it if it's not hidden. It simply won't automatically open it when the .dialog() init is called. jQuery UI Dialog, like other UI plugins are designed to upgrade existing elements into something a little more. In a way, it makes no presumptions about those elements, in terms of where it's positioned, whether it's in the dom, whether it's hidden, whether it's in a container that's hidden. The default behavior is to call $(#myDiv).dialog(); With no options specified to this init, the dialog will initialize (this element will be upgraded to a dialog) at that call and open automatically (the default value for autoOpen is true). Before this call there's nothing the dialog plugin could do to ensure the #myDiv wasn't visible before being made into a dialog. Make sense? So there are a couple options 1. create the dialog content dynamically $(divI'm in a dialog/div).dialog() 2. hide the dialog element using css on the element itself, or on a container element div id=myDiv stlye=display:none;I'm in a dialog/div or div style=display:none; div id=myDivI'm in a dialog/div /div - Richard On 1 fév, 16:56, Raymond Camden rcam...@gmail.com wrote: Ok, I'm probably missing the obvious here, but I'm having a very difficult time understanding how to use a jQuery UI dialog with a simple theme. First off, I began with the following code: html head script src=js/jquery.js/script script src=js/ui/ui.core.js/script script src=js/ui/ui.dialog.js/script script function showDialog(){ $(#example).dialog(); return false;} /script /head body p a href= onclick=return showDialog()Show the Dialog/a /p div id=example class=flora title=This is my titleI'm in a dialog!/div /body /html This is a small modification of the code here: http://docs.jquery.com/UI/Dialog All I changed was switching from the document ready code to showDialog so I could manually load the dialog. This works, but the dialog is visible on page load. I would have assumed that would be something the basic docs would cover. I had to dig a bit and finally found that I would just hide it with CSS: div style=display: none; id=example class=flora title=This is my titleI'm in a dialog!/div Ok, so no big deal, but why didn't the basic demo mention this? I'm still a bit rough w/ CSS so if I had not found this on some other demo, I would have been out of luck. Anyway, at this point it works, but it has no skin at all. I went on to the dialog theming page (http://docs.jquery.com/UI/Dialog/Theming), and it showed this example: div class=ui-dialog ui-widget ui-widget-content ui-corner-all undefined ui-draggable ui-resizable div class=ui-dialog-titlebar ui-widget-header ui-corner-all ui- helper-clearfix span id=ui-dialog-title-dialog class=ui-dialog-titleDialog title/span a class=ui-dialog-titlebar-close ui-corner-all href=#span class=ui-icon ui-icon-closethickclose/span/a /div div style=height: 200px; min-height: 109px; width: auto; class=ui-dialog-content ui-widget-content id=dialog pDialog content goes here./p /div /div So I replaced my div with that code. Right away I see that the dialog is no longer hidden. Ok, no big deal, I can fix that later I assume. There is no ID on the div though so I have no way of showing it. I added id=example to the top level div: div class=ui-dialog ui-widget ui-widget-content ui-corner-all undefined ui-draggable ui-resizable id=example Now when I click on the link to show the dialog, it does pop the dialog up, but with multiple title bars. Well, one title, but 2 Xs. Almost like jquery re-wrapped the div. There is a thick white border around the item. I'm pretty frustrated. I've looked around at the demos and docs, but I can't seem to find a very simple _minimal_ example. Any help please?
[jQuery] Re: Cascade (chained) works in Firefox but not in IE
...I must add and point out that the EXACT SAME DATA exists in the external file and the inline var. So it is ALSO very strange that the accents as mentioned display correctly in the first example (pulling from the inline var) and don't in the second example (pulling from the external file). I guess this helps to isolate where the problem is occuring? Some parsing routine that only applies to externally-read files? On Feb 1, 12:10 pm, James james.tilb...@gmail.com wrote: Update2: The problematic page is still up as promised for discussion purposes, but I have a breakthrough to report. I never would have suspected this in a million years, but I discovered it after following through with my same line of logic regarding the JSON data causing a problem. I eliminated single quotes and commas from the equation as these worked just fine. However, I thought I would try other characters since I noticed that accented characters were showing up strangely in the dropdown list (see under Quebec - Gaspé, for an example). Where it should say GASPé, it instead shows GASP(question mark inside a diamond). Firefox displays this, IE doesn't display anything but the loading circle graphic. I can fix this by replacing all accented characters in my data with regular alphabet characters, but the question is - why is this causing a problem with the JQuery/IE combination? I would much rather leave accented characters intact. Something in the JQuery routines can't handle these characters and/or is replacing them with a strange character. Any ideas? On Feb 1, 11:46 am, James james.tilb...@gmail.com wrote: Update: It doesn't seem to have anything to do with single quotes or commas, for that matter, inside the JSON data. Now HERE'S something to make you scratch your head: I have now put the complete data file back up in the external file ('CANADA_3.js') and I have ALSO put the EXACT same data file into the static var included inline in the HTML page ('list3'). This is the best demonstration of the problem: The external file and the static var both load fine if using Firefox. Only the static var works for IE. Live page (will not change until further response):http://jamestilberg.com/jquery/ James ? On Feb 1, 11:22 am, James james.tilb...@gmail.com wrote: @Mike Thanks. But it should have been working with the default code since dropdown 2 was working - dropdown 3 used the exact same principle. There is definitely something going on different between FF and IE. Question - Could the existence of single quotes within the JSON data throw off JQuery? example: If one of the cities is O'Brien I ask because I have now put up a refined page with the two methods and I have used a smaller version of the data file and guess what? It now works. So this leads me to believe the JSON data itself may have been causing a problem with IE only (Firefox always worked). http://jamestilberg.com/jquery/ The thing is, I had already validated the JSON data with several different online JSON validators I guess I need to build the JSON file back up and see if something specific stumps JQuery... On Feb 1, 2:01 am, Mike Nichols nichols.mik...@gmail.com wrote: @James Thinking about what you are doing here with the third dropdown...By attaching that dropdown to the second you are telling it to be filtered by the second dropdown's selected value...which is not selected yet since it just loaded so I would presume you shouldn't have any data in the third drop down. To support this behavior in the past I used the 'event' property of the options to define which event actually fires a cascade ( the defalt is 'changed'). Then I manually fire cascade within the parent element's change handler. : //when 'make' is selected... $(.seconddropdown) .cascade(.firstdropdown,{ ajax: 'firsturl.js' }) .bind(change,function() { $(this).trigger(custom.changed);//manually call cascade }); $(.thirddropdown) .cascade(.secondbehavior,{ event : custom.changed,//bind to custom event to prevent loading from cascade ajax: 'secondurl.js', }); On Jan 31, 4:39 pm, James james.tilb...@gmail.com wrote: I am new to JQuery and your cascading dropdown was exactly what I was looking for. After formatting my data in JSON I have tested out the Chained example (http://dev.chayachronicles.com/jquery/cascade/ index.html) and it ONLY WORKS in Firefox and NOT IE. I am attempting to load the data from two external files, while your example loads the second data set from a static var. Is there a further step necessary to get this to work in IE? I have my working example
[jQuery] Re: Problems understanding jQueryUI and Dialogs
On Sun, Feb 1, 2009 at 10:56 AM, Raymond Camden rcam...@gmail.com wrote: Ok, so no big deal, but why didn't the basic demo mention this? I'm still a bit rough w/ CSS so if I had not found this on some other demo, I would have been out of luck. This is valuable feedback. Thank you. We want to make it even easier to get up and going quickly. With your help, I'm sure we can do it. Anyway, at this point it works, but it has no skin at all. I went on to the dialog theming page (http://docs.jquery.com/UI/Dialog/Theming), and it showed this example: div class=ui-dialog ui-widget ui-widget-content ui-corner-all undefined ui-draggable ui-resizable div class=ui-dialog-titlebar ui-widget-header ui-corner-all ui- helper-clearfix span id=ui-dialog-title-dialog class=ui-dialog-titleDialog title/span a class=ui-dialog-titlebar-close ui-corner-all href=#span class=ui-icon ui-icon-closethickclose/span/a /div div style=height: 200px; min-height: 109px; width: auto; class=ui-dialog-content ui-widget-content id=dialog pDialog content goes here./p /div /div So I replaced my div with that code. Actually, this is a sample of markup that will exist after the .dialog() init call has turned your simple div into a jQuery UI Dialog. This is the after where the before is something like div id=dialog pDialog content goes here./p /div All ui-{widgetname} classes are added by UI plugins themselves. So if you're ever creating markup that contains them, that's not the intended use. I guess we need to make that more clear on this page. Right away I see that the dialog is no longer hidden. Ok, no big deal, I can fix that later I assume. There is no ID on the div though so I have no way of showing it. I added id=example to the top level div: div class=ui-dialog ui-widget ui-widget-content ui-corner-all undefined ui-draggable ui-resizable id=example Now when I click on the link to show the dialog, it does pop the dialog up, but with multiple title bars. Well, one title, but 2 Xs. Almost like jquery re-wrapped the div. There is a thick white border around the item. This sounds like it's related to the fact that you've used (as I explained above) the after markeup. So you manually turned it into a UI dialog, and then the plugin went and turned *that* into a dialog. Hence the 2 Xs. I'm pretty frustrated. I've looked around at the demos and docs, but I can't seem to find a very simple _minimal_ example. Any help please? I'm sorry for your frustration. Here are what we feel are some minimal examples http://jquery-ui.googlecode.com/svn/tags/testing/demos/dialog/default.html http://jquery-ui.googlecode.com/svn/tags/testing/demos/dialog/modal.html http://jquery-ui.googlecode.com/svn/tags/testing/demos/dialog/modal-message.html http://jquery-ui.googlecode.com/svn/tags/testing/demos/dialog/modal-confirmation.html http://jquery-ui.googlecode.com/svn/tags/testing/demos/dialog/modal-form.html You can preview them and do 'view source'. We've tried to make them as minimal and straightforward as possible. The same are also included in the latest preview release (1.6rc6) development bundle, inside the 'demos' folder. If you feel there are some important examples we've missed, or that we could make the existing examples even easier to understand and use, please post to the jQuery UI mailing list: http://groups.google.com/group/jquery-ui Thanks. - Richard
[jQuery] Re: Problems understanding jQueryUI and Dialogs
On Sun, Feb 1, 2009 at 12:24 PM, Richard D. Worth rdwo...@gmail.com wrote: I'm pretty frustrated. I've looked around at the demos and docs, but I can't seem to find a very simple _minimal_ example. Any help please? I'm sorry for your frustration. Here are what we feel are some minimal examples http://jquery-ui.googlecode.com/svn/tags/testing/demos/dialog/default.html http://jquery-ui.googlecode.com/svn/tags/testing/demos/dialog/modal.html http://jquery-ui.googlecode.com/svn/tags/testing/demos/dialog/modal-message.html http://jquery-ui.googlecode.com/svn/tags/testing/demos/dialog/modal-confirmation.html http://jquery-ui.googlecode.com/svn/tags/testing/demos/dialog/modal-form.html Those work, but here are some more friendly urls http://jqueryui.com/demos/dialog/ http://jqueryui.com/demos/dialog/default.html http://jqueryui.com/demos/dialog/modal.html http://jqueryui.com/demos/dialog/modal-message.html http://jqueryui.com/demos/dialog/modal-confirmation.html http://jqueryui.com/demos/dialog/modal-form.html - Richard
[jQuery] not selector
I'm having some problems using the not selector on my jquery code. I have elements that have one classname first and only one of them has a second classname second (that is used in many other elements). I want to select the elements that have the first but not the second. The selector I have is: $('div.first:not(div.second)') An the selector is not working. I'm using it incorrectly or is a bug? PD: you can test this problem in jquery.com page. There are 2 elements li that has the classnames jq-first. You can select all li elements on the page and there are 52. So, you can select all li elements on the page without the elements with jq-first classname, and the result must be 50 elements. But when I execute: $('li:not(li.jq-first)') There are no elements selected.
[jQuery] Re: Clickable slideshow not working as expected.
When do you call the hover-function? On $(document).ready? To me it looks like the hover won't work because it is never applied to the next photo (as it isn't a current-class when loaded). Maybe it should go like this: function addMyFunctionality() { $('.current img.after').hover( function() { $(this).animate({opacity: 0}); }, function() { $(this).animate({opacity: 1}); } $('.current').click(function() { $(this).removeClass('current').addClass ('invisible'); $(this).next('div').removeClass ('invisible').addClass('current'); addMyFunctionality(); });
[jQuery] Re: Click Links in the Nnavigation Bar
On Feb 1, 2009, at 3:06 AM, Pedram wrote: I have another tiny question $(Ul li a), $(ul a), $(a,$(ul)) which one has the great performance !!? I would go with either $('ul a') or $('a', 'ul'), but $('ul a') seems more readable to me, as it follows the CSS syntax. Since it's not possible in a valid DOM to have an A that is a descendant of a UL but not a descendant of an LI, the LI is superfluous. No need to do an extra getElementsByTagName there. Also, if you're using a contextual selector, you don't need to wrap the context in its own jQuery object -- $(a,$(ul)). --Karl On Feb 1, 12:02 am, Pedram pedram...@gmail.com wrote: I just had some Doubt , the performance is great On Jan 31, 11:54 am, Karl Swedberg k...@englishrules.com wrote: Hi Pedram, I agree with Nic. Especially if you're only dealing with 4 elements, binding directly on them seems like the most sensible solution. Are you noticing performance problems? You shouldn't be seeing any, with scripts this basic. In any case, there are a couple selector optimizations you could implement, if necessary. Something like this: var $navBarLinks = $('#your-nav-bar-id a'); $navBarLinks.click(function() { $navBarLinks.removeClass('active'); $(this).addClass('active'); }); --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On Jan 31, 2009, at 2:36 PM, Pedram wrote: I'm looking to improve the performance , which of these 2 codes has the best performance. On Jan 30, 1:04 am, Nic Luciano adaptive...@gmail.com wrote: What exactly are you trying to do, what is the issue? Maybe just preference here (and I'm also just guessing what you're asking) but I don't see a reason not to put the events on the elements themselves $(ul li a).click(function() { $ (this).parent().parent().find(.active).removeClass(active); $(this).addClass(active); }); On Fri, Jan 30, 2009 at 3:07 AM, Pedram pedram...@gmail.com wrote: Dear Karl , I know You are Expert in these Issues do you have any idea for me Thanks On Jan 29, 5:44 pm, Pedram pedram...@gmail.com wrote: Hi Folks , I have some links in my Navigation bar such as below , I Used FIND in my code , does anyone has any better solution for me , I also used Event Delegation in the system . ul lia href=# class=activea/a/li lia href=#b/a/li lia href=#c/a/li lia href=#d/a/li /ul $(ul).bind(click,function(e){ var clicked=$(e.target); $(this).find(a.active).removeClass(active); clicked.addClass(active); });
[jQuery] Re: prototip-like script for jQuery
Search plugins.jquery.com for 'tooltip' http://plugins.jquery.com/search/node/tooltip+type%3Aproject_project Also, you'll find some on this page http://wiki.jqueryui.com/Essential-Controls-List#tooltip - Richard On Sun, Feb 1, 2009 at 11:00 AM, maryspt miga...@gmail.com wrote: Hi, is there any jQuery script similar to ProtoTip ? I need a script that shows the hint which doesn't move when the mouse is moved and doesn't disappear if the mouse is over the shown hint...
[jQuery] Re: Problems understanding jQueryUI and Dialogs
On Feb 1, 11:24 am, Richard D. Worth rdwo...@gmail.com wrote: All ui-{widgetname} classes are added by UI plugins themselves. So if you're ever creating markup that contains them, that's not the intended use. I guess we need to make that more clear on this page. Right away I see that the dialog is no longer hidden. Ok, no big deal, I can fix that later I assume. There is no ID on the div though so I have no way of showing it. I will definitely look at the links below for example. But why does the page (http://docs.jquery.com/UI/Dialog/Theming) not then describe how to theme the dialog? Given the basic dialog, the 'before' stage, I still don't get how we get to the 'pretty' version. It's like the page shows us the result CSS w/o talking about how to get there. Does that make sense? Ie, given the code on this page: http://docs.jquery.com/UI/Dialog, I would have expected instructions on how to apply the theme. If you feel there are some important examples we've missed, or that we could make the existing examples even easier to understand and use, please post to the jQuery UI mailing list: Will do for future posts. Totally my fault - went to the listserv page and followed the first link I found. ;)
[jQuery] Re: Superfish Dropdown BG Problem
Joel or anyone else, I have one last problem. The SuperSubs plugin works only on the first sub-sub- nav. I'm not sure why. Take a look here and see the second sub nav's display: http://www.stcyril.net/site/ It seems like there is some overflow issue since the background repeats all the way to the edge of the border. Have you seen this before? Also more minor is that the dropshadow no longer appears. The sub-sub-nav problem is a deal-killer. I can't use Superfish unless I resolve that. Thank you. You guys have been great to us Superfish newbies. Sean On Feb 1, 8:56 am, levine@gmail.com levine@gmail.com wrote: Also, where do I find the font color for the menu? I have looked in the RM css files as well as the SF css files and can't seem to make out where it is. Thanks again, Ron On Feb 1, 7:59 am, levine@gmail.com levine@gmail.com wrote: Thanks for the heads up on turning off the call. However, I still don't have any idea of where to put the code that Joel is talking about. Does this go into the Rhuk_milkyway css file??? Regards, Ron On Feb 1, 2:22 am, bklyn2cali s...@mediajelly.com wrote: Joel, I've got this working now, thank you. One last issue: the SuperSubs plugin works only on the first sub-sub- nav. I'm not sure why.http://www.stcyril.net/site/ It seems like there is some overflow issue since the background repeats all the way to the edge of the border. I'm so close to getting this done, just this issue, and also more minor is that the dropshadow no longer appears. Thanks for your help. It is much appreciated. Sean On Jan 31, 6:08 am, Joel Birch joeldbi...@gmail.com wrote: Hello, This is the exact same issue someone else had just the other day, and they were also a Joomla user. Your problem is figure out by selecting the menu li element using Firebug. The Superfish background rule is being overridden by the #pillmenu li li rule which is in the green.css file. The reason this rule gets precedence over the Superfish CSS is because it uses an id in the selector, which trumps the .sf-menu class selector. Interestingly, 'pillmenu' was the exact same id that was involved with the other Joomla user's issue, so I assume it must be part of Joomla's templates. Solve your problem by adding the id to your Superfish selector in order to increase its 'specificity', like this: #pillmenu .sf-menu li { background: #BDD2FF url('../images/ normal_bg.png') repeat-x 0 0; } Joel Birch.
[jQuery] Re: jQuery and Javascript timer question
On Sun, Feb 1, 2009 at 12:09 PM, thertze...@gmail.com thertze...@gmail.com wrote: what? That statement checks to see if the element clicked has the class of .btn px, I dont know what your saying, the statement there does work correctly, its \$(this).css({ backgroundColor:color }); that isnt modifying the css, thats where my problems are. Class names cannot have spaces. Ricardo is correct; the selector you're using is for a px element inside of another with classname 'btn'. It's being ran from perl, so when perl is parsing the print statement, it thinks $~whatever is a perl variable. Which is strange, because normally use strict; will bark at you, but instead perl finds a way to find out what $~whatever is. Its kinda strange, so I have to escape them server side, but client side they come out as normal $ Sure it requires escaping for Perl. But, effectively, you're posting a Perl print statement, not JS. Post the actual, real lines of code, as it will be when it meets the interpreter. Any format it's in before it reaches the browser is unimportant and just getting in the way. Just view source and copy that. Next, people will be posting their gzipped scripts to be debugged. ;-)
[jQuery] Re: Problems understanding jQueryUI and Dialogs
On Sun, Feb 1, 2009 at 1:11 PM, Raymond Camden rcam...@gmail.com wrote: On Feb 1, 11:24 am, Richard D. Worth rdwo...@gmail.com wrote: All ui-{widgetname} classes are added by UI plugins themselves. So if you're ever creating markup that contains them, that's not the intended use. I guess we need to make that more clear on this page. Right away I see that the dialog is no longer hidden. Ok, no big deal, I can fix that later I assume. There is no ID on the div though so I have no way of showing it. I will definitely look at the links below for example. But why does the page (http://docs.jquery.com/UI/Dialog/Theming) not then describe how to theme the dialog? Given the basic dialog, the 'before' stage, I still don't get how we get to the 'pretty' version. It's like the page shows us the result CSS w/o talking about how to get there. Does that make sense? Ie, given the code on this page: http://docs.jquery.com/UI/Dialog, I would have expected instructions on how to apply the theme. Good point. This page is not really intended to help you apply a theme to a dialog, and we need a page that does speak to this (as you've pointed out). This page is intended for a designer who want's to do a completely custom jQuery UI theme, or perhaps they just want to theme the dialog widget. This guides them along the way of how do you create or design a theme for this component. But for most users, ThemeRoller may be enough, or at least a start. And that should be as simple as linking to ui.all.css (which @imports ui.core.css, ui.theme.css, ui.dialog.css). If you feel there are some important examples we've missed, or that we could make the existing examples even easier to understand and use, please post to the jQuery UI mailing list: Will do for future posts. Totally my fault - went to the listserv page and followed the first link I found. ;) Understandable. See you there in the future :) - Richard
[jQuery] Re: jQuery and Javascript timer question
Right but you can have to classes defined to one element, and thats what is being done here. The statement does validate nonetheless, but rather why this.css doesn't correctly reassign the background is what im unsure of. On Feb 1, 12:20 pm, brian bally.z...@gmail.com wrote: On Sun, Feb 1, 2009 at 12:09 PM, thertze...@gmail.com thertze...@gmail.com wrote: what? That statement checks to see if the element clicked has the class of .btn px, I dont know what your saying, the statement there does work correctly, its \$(this).css({ backgroundColor:color }); that isnt modifying the css, thats where my problems are. Class names cannot have spaces. Ricardo is correct; the selector you're using is for a px element inside of another with classname 'btn'. It's being ran from perl, so when perl is parsing the print statement, it thinks $~whatever is a perl variable. Which is strange, because normally use strict; will bark at you, but instead perl finds a way to find out what $~whatever is. Its kinda strange, so I have to escape them server side, but client side they come out as normal $ Sure it requires escaping for Perl. But, effectively, you're posting a Perl print statement, not JS. Post the actual, real lines of code, as it will be when it meets the interpreter. Any format it's in before it reaches the browser is unimportant and just getting in the way. Just view source and copy that. Next, people will be posting their gzipped scripts to be debugged. ;-)
[jQuery] Re: getElementById with ajax
efet, I haven't messed with .asp. Only ever use .php, so am not too sure how this will work for you. But I thought I would provide this example code below to illustrate how it might work. After you read through the links gmacgregor gave you, perhaps you can tweak it and get it to work to your desires. // index.asp // Perhaps part of index.asp is structured like so... input type=text id=ReceiverPostalCode / input type=text id=ReceiverCountry / a href= id=getResult / div id=shipWrapper/div // shipping.js // Assuming ship.asp outputs the result to a div // with an id of result (ie div id=result/div). $(document).ready(function(){ var postCode = $(#ReceiverPostalCode).val(); var postCountry = $(#ReceiverCountry).val(); var url = ship.asp?ShippingPostalCode= + postCode + %ShippingCountry= + postCountry; var getShipping = function(){ url += #result; $(#shipWrapper).html('div id=shippingResult/div'); $(#shippingResult).hide(); $(#shippingResult).load(url).show(); return false; }; $(#getResult).bind(click,getShipping); }); I didn't test this...but should get you started in the right direction. Hope this helps, Manowar721 On Jan 31, 10:55 am, efet efetun...@gmail.com wrote: This will be my first application with using jQuery library, so I might not make sense. I will try to explain what I want to do as simple as possible. I have two web pages, index.asp, ship.asp. index.asp: I have a form with ReceiverPostalCode and ReceiverCountry inputs. ship.asp: this is where I submit form inputs from index.asp to receive shipping quotes. For example, I get quotes at ship.asp?ShippingPostalCode=02116ShippingCountry=US When customer enters ReceiverPostalCode and ReceiverCountry on index.asp, I want quotes immediately appear in index.asp. How do I do this basing my codes on jQuery?
[jQuery] fade animations for graphics next to eachother; issues
Hi. I've got several graphics next to eachother that i've set to opacity=0.4; on mouseover i want them to light up to opacity = 1. So far so good, i have onMouseOver and onMouseOut events that get called, and i thought i'd just add animate() calls and i'd be fine.. Turns out that aint so.. It's probably multiple events firing in rapid succession after eachother, but i have no real clues yet on how to buffer the events and get the animation correct. have a look at http://82.170.249.144/mediaBeez/index.php login: admin password: test23 then click on the menu item admin tree that appears. then hover your mouse over the icons in the lower-left of the screen that appears. when moving from left to right, it doesn't light up correctly :( any help is greatly appreciated..
[jQuery] Re: Superfish IE6
I have solved the problem listed below by adding a width to the secondary UL Ul.dropdown li ul { display: none; position: absolute; top: 2em; left: 0; width:12em; } -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of rhythmicde...@gmail.com Sent: Thursday, January 29, 2009 5:14 PM To: jQuery (English) Subject: [jQuery] Superfish IE6 I just installed Superfish and its working great except for IE 6. Before adding Superfish I had the Suckerfish version working, except for IE6 of course. My problem is that when I click on one of the four menu items the bottom two move over to the right. Almost like they lose their display:block. I have been round with this for a couple of hours now and cant seem to find the trick which is probably staring me right in the face. I searched the first four pages of this group with 'Superfish IE6' but did not find anything that helped. I am using Google Blueprint's grid for the layout, but I dont think that should cause any issues. Thanks for any help. Here is my CSS /* START DROP DOWN */ li ul { top: auto; left: auto; } ul.dropdown { padding: 0; margin: 0; list-style: none; } ul.dropdown li { float: right; position: relative; /*width: 10em;*/ } ul.dropdown li ul { display: none; position: absolute; top: 2em; left: 0; } ul.dropdown li ul li { background:#F08C2A; text-align:left; padding:5px; width: 12em; border-bottom:1px solid #F7A444; } ul.dropdown li ul li.last{ border:none; background-color:#FFF; background:url('../images/gr_menu_bottom.gif'); background-repeat:no-repeat; line-height:9px; } ul.dropdown li ul li a:link, ul.dropdown li ul li a:visited, ul.dropdown li ul li a:hover, ul.dropdown li ul li a:active { font-family:arial, sans-serif; font-weight:bold; font-size:90%; color:#FFF; text-decoration:none; } ul.dropdown li ul li a:hover { color: #1665B0; } ul.dropdown li:hover ul, li.over { display: block; } /* END DROP DOWN */ Here is my JS $(document).ready(function() { $('ul.dropdown').superfish({ hoverClass: 'over', autoArrows: false }); }); And here is the HTML markup div class=span-8 last id=navigation table tr td class=limg src=images/gr_nav_left.jpg //td td class=center ul class=dropdown li a href=index.php?page=news img src=images/btn_news.gif alt=home height=33 width=63 / /a /li li a href=index.php?page=partners img src=images/btn_partners.gif alt=home height=33 width=117 / /a /li li a href=index.php?page=contact_us img src=images/btn_contact_us.gif alt=home height=33 width=134 / /a /li li a href=index.php?page=about_us img src=images/btn_about_us.gif alt=home height=33 width=120 / /a /li li a href=index.php?page=services img src=images/btn_services.gif alt=home height=33 width=105 / /a ul lia href=index.php? page=servicesservice=contract_staffingContract Staffing/a/li lia href=index.php? page=servicesservice=load_performanceLoad Performance/a/li lia href=index.php? page=servicesservice=project_outsourcingProject
[jQuery] Re: Guidelines on Graceful Degradation When JavaScript Disabled?
It's as simple as that: in the first step build a page completely without JavaScript so that everything works fine. Then add JavaScript/ jQuery to the game and improve the user experience.This concept is also referred to as Progressive Enhancement. You will find quite some information about it on the web. --Klaus On 1 Feb., 16:31, WebWiz web...@gmail.com wrote: I'm new to jQuery so I apologize if this is a dumb question. I'd like to take advantage of the visually interesting things jQuery can do. But I'm bumping into a small but significant number of end users who either have JavaScript disabled or are running old browsers with bad JS support. Since I want to provide at least a decent experience for all site visitors, I'm wondering if there are any guidelines, suggestions, or tips on how to build a web page so whatever's being done via jQuery still works and looks OK if JavaScript isn't coming along for the ride. Thanks!
[jQuery] Re: not selector
Try $('div.first:not(.second)') and $('li:not(.jq-first)') (without tag names in the :not() selector) --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Feb 1, 2009, at 12:40 PM, Javier Martinez Fernandez wrote: I'm having some problems using the not selector on my jquery code. I have elements that have one classname first and only one of them has a second classname second (that is used in many other elements). I want to select the elements that have the first but not the second. The selector I have is: $('div.first:not(div.second)') An the selector is not working. I'm using it incorrectly or is a bug? PD: you can test this problem in jquery.com page. There are 2 elements li that has the classnames jq-first. You can select all li elements on the page and there are 52. So, you can select all li elements on the page without the elements with jq-first classname, and the result must be 50 elements. But when I execute: $('li:not(li.jq-first)') There are no elements selected.
[jQuery] Vertical menu for Newbees
Hello, After some not so nice experiences with the DW-Spry-Menus I'd like to test these ones. As a Newbee I wonder how I can make this vertical menu with the flyouts going to the left side instead to the right as the vertical menu will take place at the right side and so flyout to the left. Am I clear?? Where is the switch?? In the JS or in the CSS ??? Thank you udo
[jQuery] style
I am looking for someone to have a little fun with. Something to look foward to every thursday night to relieve some stress from work. I don't want to know about your crazy ex-girlfriend or your crappy boss. I just want to have some fun. http://www.styleweb.co.cc Im trashmouth5
[jQuery] click Event not working on first binded element on IE after one click
So, I am implementing a page on which words that have hints associated in the DB are binded with the click event to show the Hint. Initially, I go through and replace the words with html that goes span class=hintword/span So, then I bind the hint class with the click event, $(.hint).bind(mouseup,function(e) { var clickElement = e.target; var clickText = $(clickElement).text(); $.post('term.cfc?method=getTermDefreturnFormat=json', {term:clickText},showHint,json); } ) The problem is on IE 7, the first word that is binded, works fine for the first click, but after that the click event for it is not registered. For the rest of the words, the click event works fine. On FF, everything works fine. Any ideas on what could be wrong here?
[jQuery] Reload Javascript file
Hi everybody, i wrap an div with the id=content from figurative.php with ajax on load it into my index.php it looks then index.php#figurative But i have a problem with it, because the figurative.php load pictures from a folder and i will use the fancybox to show the pictures. the problem is, that the fancybox did not work, because i think i have to reload the javascript file. becaue on index.php is no gallery avalible and so the function is not working. this is my ajax reload function: $(document).ready(function() { $('#content').wrap('div id=content-wrapper/div'); function pageload(hash) { if(hash) { $(#content-wrapper).load(hash + .php #content,'',function(){ $('#content-wrapper').show('normal'); $('#load').fadeOut('normal'); }); } else { $(#content-wrapper).load(index.php #content); //default } } $.historyInit(pageload); $('#nav li a').click(function(){ var hash = $(this).attr('href'); hash = hash.replace(/^.*#/, ''); hash = hash.substr(0,hash.length-4); $('#content-wrapper').hide('fast',function(){$.historyLoad(hash)}); $('#load').remove(); $('#wrapper').append('span id=loadLOADING.../span'); $('#load').fadeIn('normal'); return false; }); }); you can see the problem on: http://www.guido-grun.de/Site/en/index.php http://www.guido-grun.de/Site/en/index.php#figurative Hope everybody has a solution for that thanks Guido
[jQuery] Re: $(this).ready with images
$('#image').bind('onreadystatechange load', function(){ if (this.complete) $(this).height()...etc }); On Feb 1, 12:13 pm, Balazs Endresz balazs.endr...@gmail.com wrote: Unfortunately it's not that simple, thanks to IE:http://groups.google.com/group/jquery-dev/browse_thread/thread/24b107...http://dev.jquery.com/ticket/3930 On Jan 31, 4:20 pm, frederik.r...@gmail.com frederik.r...@gmail.com wrote: Ok! That's great! Thanks for the explanation!
[jQuery] Re: fade animations for graphics next to eachother; issues
Solved it; don't put the graphics in a table cell to arrange them, use float:left; Then it works as expected with animate() calls in onmouseover and onmouseout Rene Veerman wrote: Hi. I've got several graphics next to eachother that i've set to opacity=0.4; on mouseover i want them to light up to opacity = 1. So far so good, i have onMouseOver and onMouseOut events that get called, and i thought i'd just add animate() calls and i'd be fine.. Turns out that aint so.. It's probably multiple events firing in rapid succession after eachother, but i have no real clues yet on how to buffer the events and get the animation correct. have a look at http://82.170.249.144/mediaBeez/index.php login: admin password: test23 then click on the menu item admin tree that appears. then hover your mouse over the icons in the lower-left of the screen that appears. when moving from left to right, it doesn't light up correctly :( any help is greatly appreciated..
[jQuery] Re: fade animations for graphics next to eachother; issues
have a look athttp://82.170.249.144/mediaBeez/index.php login: admin password: test23 Where is your script that does the animation?
[jQuery] Re: about :not(:last)
http://jquery.nodnod.net/cases/85 Parece ok aqui. Pode ser alguma outra coisa na tua página, não dá pra saber sem ver o html. Seems to work fine here. Could you post a complete test page showing this issue? - ricardo On Feb 1, 1:25 pm, Garito gar...@gmail.com wrote: Hi! Please, consider this code: $.fn.url2 = function(absoluta) { var slots = $(this).parents('dl:not(:last)').map(function() { return $(.Texto:first, $(this)).text(); }); var slots2 = $(this).parents('dl').map(function() { return $(.Texto:first, $(this)).text(); }); return slots.get().join(/) + ' -- ' + slots2.get().join(/); }; The funny thing of this code is that slots and slots2 have the same items Could you point me why slots put the last dl? I suppose that dl:not(:last) retrieves all the parents except the last one but this don't work Thanks!
[jQuery] Re: Selecting parent id
var getParent = function(){ myparentID = $(this).parent().parent().parent().attr(id); parentID = My table ID is: + myparentID; alert (parentID); }; $(td).bind(click, getParent); Hope that helps, Manowar721 On Jan 31, 3:01 pm, Chrille christoffer...@gmail.com wrote: Hi everyone, I have a lot of tables, like this: table id=stuff1trtdlorem/tdtdipsum/td/table table id=stuff2trtdlorem2/tdtdipsum2/td/table I want to loop through all td:s and select the id of the parent table. What is the best solution for that? $('table td').each(function(){ // select the parent table id here $('parenttable').attr(id); }); Best regards, Christoffer
[jQuery] Re: jquery and minify
Thanks Ariel. I have found out that http://code.google.com/p/minify/ retains comments when that are like /*! */ also I have seen that sometimes jQuery has this style of comment already 2009/1/31 Ariel Flesler afles...@gmail.com You should keep the headers somewhere, preferably close to the code. Something like this: /** * jQuery */ (function($){...}); /** * Plugin 1 */ (function($){...}); /** * Plugin 2 */ (function($){...}); -- Ariel Flesler http://flesler.blogspot.com On Jan 29, 10:53 pm, Sam Sherlock sam.sherl...@gmail.com wrote: Having just seen this sitehttp://www.highpointvillage.co.uk; running it through yslow (it got an f 50/100), one way to improve it would be reducing the http requests - but:- Would combining the scripts on a site like this with minify be contrary to the license of jQuery? could jquery be minifed in a file with the comment header retained at the top of combined file? or would one have to have a jquery.js file minified with comment header intact and combine the plugins?
[jQuery] drag/drop replace text/element
I'm trying to drag and drop between lists. I have the simple drag and drop down, but I want to add something else... I want drop a list item to another list item and replace the text or the drop zone. For example. I have two lists: ul id=sortable1 class='droptrue' li id=whatever 1 class=ui-state-defaultwhatever 1/li li id=whatever 2 class=ui-state-defaultwhatever 2/li li id=whatever 3 class=ui-state-defaultwhatever 3/li /ul ul id=sortable1 class='droptrue' li id=default text 1 class=ui-state-defaultdefault text 1/li li id=default text 2 class=ui-state-defaultdefault text 2/li li id=default text 3 class=ui-state-defaultdefault text 3/li /ul so if I drag whatever 1 to default text 1 it would replace default text 1 with whatever 1
[jQuery] Re: toggle checkbox when clicking td
I'm one step closer ;]. I'm traversing from tr not from td. And it seems to work fine except that now the checkbox itself doesn't have the ability to check or uncheck so i've tried to add some more code ([1]) but then I have to doublecklick it to check or unckeck =/ weird... my code: --- var tr = $(.myTable tr) tr.click(function(){ var input = $(input[type=checkbox], this); input.attr('checked', !input.attr('checked')); /* [1] */ input.click(function(){ $(this).attr('checked', !$(this).attr ('checked')); }); }); please help. On Feb 1, 12:10 am, Slafs slaf...@gmail.com wrote: Hi! I would like to write a js script using jQuery which could help me to toggle checkbox. I have one checkbox for each row of table and i would like to simplify the checking and unchecking the boxes by letting user just to click anywhere on the row to do this. I was trying something with children and parent function but it seems to doesn't work. table: table class=myTable tr tdfirst/tdtdrow/td tdinput type=checkbox name=1 value=1/td /tr ... /table my jQ code: $(document).ready(function(){ $(.myTable td).click(function(){ $(this).parent(tr).children (input:checkbox).each(function(){ this.checked = !this.checked; }); }); any help? thanks in advance!
[jQuery] Re: Problems understanding jQueryUI and Dialogs
Just a quick last note here (before I move to the UI forum for future UI problems). I switched over to 1.6rc6, and everything worked a heck a lot better. Thanks for the help all. On Feb 1, 12:41 pm, Richard D. Worth rdwo...@gmail.com wrote: On Sun, Feb 1, 2009 at 1:11 PM, Raymond Camden rcam...@gmail.com wrote: On Feb 1, 11:24 am, Richard D. Worth rdwo...@gmail.com wrote: All ui-{widgetname} classes are added by UI plugins themselves. So if you're ever creating markup that contains them, that's not the intended use. I guess we need to make that more clear on this page.
[jQuery] Re: drag/drop replace text/element
We'd love to help you over on the jQuery UI list: http://groups.google.com/group/jquery-ui Thanks. - Richard On Sun, Feb 1, 2009 at 3:15 PM, coyote...@msn.com webmas...@fantasyplaymakers.com wrote: I'm trying to drag and drop between lists. I have the simple drag and drop down, but I want to add something else... I want drop a list item to another list item and replace the text or the drop zone. For example. I have two lists: ul id=sortable1 class='droptrue' li id=whatever 1 class=ui-state-defaultwhatever 1/li li id=whatever 2 class=ui-state-defaultwhatever 2/li li id=whatever 3 class=ui-state-defaultwhatever 3/li /ul ul id=sortable1 class='droptrue' li id=default text 1 class=ui-state-defaultdefault text 1/li li id=default text 2 class=ui-state-defaultdefault text 2/li li id=default text 3 class=ui-state-defaultdefault text 3/li /ul so if I drag whatever 1 to default text 1 it would replace default text 1 with whatever 1
[jQuery] Re: Cascade (chained) works in Firefox but not in IE
have you attached fiddler and firebug to see what it happening? On Feb 1, 10:14 am, James james.tilb...@gmail.com wrote: ...I must add and point out that the EXACT SAME DATA exists in the external file and the inline var. So it is ALSO very strange that the accents as mentioned display correctly in the first example (pulling from the inline var) and don't in the second example (pulling from the external file). I guess this helps to isolate where the problem is occuring? Some parsing routine that only applies to externally-read files? On Feb 1, 12:10 pm, James james.tilb...@gmail.com wrote: Update2: The problematic page is still up as promised for discussion purposes, but I have a breakthrough to report. I never would have suspected this in a million years, but I discovered it after following through with my same line of logic regarding the JSON data causing a problem. I eliminated single quotes and commas from the equation as these worked just fine. However, I thought I would try other characters since I noticed that accented characters were showing up strangely in the dropdown list (see under Quebec - Gaspé, for an example). Where it should say GASPé, it instead shows GASP(question mark inside a diamond). Firefox displays this, IE doesn't display anything but the loading circle graphic. I can fix this by replacing all accented characters in my data with regular alphabet characters, but the question is - why is this causing a problem with the JQuery/IE combination? I would much rather leave accented characters intact. Something in the JQuery routines can't handle these characters and/or is replacing them with a strange character. Any ideas? On Feb 1, 11:46 am, James james.tilb...@gmail.com wrote: Update: It doesn't seem to have anything to do with single quotes or commas, for that matter, inside the JSON data. Now HERE'S something to make you scratch your head: I have now put the complete data file back up in the external file ('CANADA_3.js') and I have ALSO put the EXACT same data file into the static var included inline in the HTML page ('list3'). This is the best demonstration of the problem: The external file and the static var both load fine if using Firefox. Only the static var works for IE. Live page (will not change until further response):http://jamestilberg.com/jquery/ James ? On Feb 1, 11:22 am, James james.tilb...@gmail.com wrote: @Mike Thanks. But it should have been working with the default code since dropdown 2 was working - dropdown 3 used the exact same principle. There is definitely something going on different between FF and IE. Question - Could the existence of single quotes within the JSON data throw off JQuery? example: If one of the cities is O'Brien I ask because I have now put up a refined page with the two methods and I have used a smaller version of the data file and guess what? It now works. So this leads me to believe the JSON data itself may have been causing a problem with IE only (Firefox always worked). http://jamestilberg.com/jquery/ The thing is, I had already validated the JSON data with several different online JSON validators I guess I need to build the JSON file back up and see if something specific stumps JQuery... On Feb 1, 2:01 am, Mike Nichols nichols.mik...@gmail.com wrote: @James Thinking about what you are doing here with the third dropdown...By attaching that dropdown to the second you are telling it to be filtered by the second dropdown's selected value...which is not selected yet since it just loaded so I would presume you shouldn't have any data in the third drop down. To support this behavior in the past I used the 'event' property of the options to define which event actually fires a cascade ( the defalt is 'changed'). Then I manually fire cascade within the parent element's change handler. : //when 'make' is selected... $(.seconddropdown) .cascade(.firstdropdown,{ ajax: 'firsturl.js' }) .bind(change,function() { $(this).trigger(custom.changed);//manually call cascade }); $(.thirddropdown) .cascade(.secondbehavior,{ event : custom.changed,//bind to custom event to prevent loading from cascade ajax: 'secondurl.js', }); On Jan 31, 4:39 pm, James james.tilb...@gmail.com wrote: I am new to JQuery and your cascading dropdown was exactly what I was looking for. After formatting my data in JSON I have tested out the Chained example (http://dev.chayachronicles.com/jquery/cascade/ index.html) and it ONLY WORKS in Firefox and NOT IE. I am
[jQuery] Odd SuperSubs Issue
Joel or anyone else, The SuperSubs plugin works properly only on the first sub-sub-nav. I'm not sure why. Take a look here and see the second sub nav's display (in the top pill nav rollover Campus Life and then Student Athletics): http://www.stcyril.net/site/ The li tag seems like it is ignored or is missing on the second sub- sub-nav of any nav item. So the sub-navs work fine, and the first sub- sub-nav in any menu item works fine, but if there is another sub-sub- nav in the same menu item it displays horizontal and not vertical. Kinda weird. Has anyone seen this before? Recommended remedies? Thank you.
[jQuery] Re: toggle checkbox when clicking td
now the checkbox itself doesn't have the ability to check or uncheck What's happening is that when you click the checkbox directly, it changes the state of the checkbox. But, the click event then bubbles to the tr, where the handler changes it (back)! There are several different ways to handle this problem. One would be to put an event handler on every checkbox that would return false to stop bubbling and prevent it from reaching your tr handler. If you are using jQuery 1.3.1 you can use event delegation and the .closest() method. That's nice because it only involves a single event handler on the table. $(.myTable).click(function(e){ var $chk = $(e.target).closest(tr).find(:checkbox); if ( $chk[0] != e.target ) $chk.attr(checked, !$chk.attr(checked)); }); If the handler sees that the actually clicked element (e.target) is a checkbox, it doesn't toggle the state since the direct click took care of it. In the other cases where the enclosing td or tr is clicked, it manually toggles the state of the enclosed checkbox.
[jQuery] pass variable from button to jquery
I am displaying a bunch of data from a mysql database, shown below. After the data is displayed, I put a button for each line of data. When a user clicks the button, I call the load function. I am trying to figure out how to pass the id (received from the mysql db) for each particular record to the jquery load function. Here is my code: [code] html while($row = mysql_fetch_array($result)) { echo $row['day']; echo /tdtd; button class=volunteer value=volunteerVolunteer/button . js $(#contentcolumn).load(popup.php?gameno=?); [/code] How can I pass the id (received from mysqldb) via the Volunteer button? I'll then use this to lookup and display more data... -- View this message in context: http://www.nabble.com/pass-variable-from-button-to-jquery-tp21780863s27240p21780863.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] validation when using jquery tabs
I have used jquery tabs from the website http://docs.jquery.com/UI/Tabs I also downloaded your jquery validation script and tried to integrate both of them. So here is the scenario. I have 3 tabs, each of them have some text boxes as part of a form and all those text boxes need to be filled. I have a submit button either at the 3rd tab or right at the bottom of all the tabs. Normally with the validation script, when I hit the submit button it shows in red which boxes aren't filled. But here because of the tabs, the submit button does nothing in the foreground ... that is it doesn't go to the tab where the boxes are missing the conditions. It just stays at the same tab. But of course it doesn't submit the form so technically it works. Is there any way to make it go to the tab which is missing the conditions in the text boxes? Thanks in advance!
[jQuery] Re: jquery and minify
Yeah, I was just showing you the layout. We (jQuery) implemented the /*! since 1.3 because the YUI compressor is now used and it indeed recognizes /*!. Cheers On Sun, Feb 1, 2009 at 10:25 PM, Sam Sherlock sam.sherl...@gmail.com wrote: Thanks Ariel. I have found out that http://code.google.com/p/minify/ retains comments when that are like /*! */ also I have seen that sometimes jQuery has this style of comment already 2009/1/31 Ariel Flesler afles...@gmail.com You should keep the headers somewhere, preferably close to the code. Something like this: /** * jQuery */ (function($){...}); /** * Plugin 1 */ (function($){...}); /** * Plugin 2 */ (function($){...}); -- Ariel Flesler http://flesler.blogspot.com On Jan 29, 10:53 pm, Sam Sherlock sam.sherl...@gmail.com wrote: Having just seen this sitehttp://www.highpointvillage.co.uk; running it through yslow (it got an f 50/100), one way to improve it would be reducing the http requests - but:- Would combining the scripts on a site like this with minify be contrary to the license of jQuery? could jquery be minifed in a file with the comment header retained at the top of combined file? or would one have to have a jquery.js file minified with comment header intact and combine the plugins? -- Ariel Flesler http://flesler.blogspot.com
[jQuery] Need to make a edit layout system using php and jquery...?
Hi, I am right now trying to make a edit layout system. basicly I want to know how I can use jquery to grab the height width and position elements are at. Cause I plan to make in the edit mode to allow users to move like images and tables and texts around on the layout and even change background images and add more artistic images for their profiles. I will add also a music player. So I need to know how I can grab all positions height and width of each element on my layout and then store that data. I am planning to make databases for users where I will store their edited stuff. So I need the x and y position of where the elements are at and also the height and width. Some told me I should just grab what css element of height and width and top and left of the elements using javascript. What would you suggest on how I should do it? Can I do it using jquery or no??? Thanks for your time.
[jQuery] Re: click Event not working on first binded element on IE after one click
It probably won't make any difference, but why not use the 'click' event and 'this'? There is no need to get e.target if there are no child elements. Also, if you're doing a POST, why are you using a querystring? $('.hint').click(function(){ var clickText = $(this).text(); $.post('term.cfc', {method: 'getTermDef', returnFormat: 'json', term:clickText}, showHint, json); }); Have you tried a simple alert/log function in place of showHint, as a check for the event firing? On Feb 1, 5:33 pm, shahku...@gmail.com shahku...@gmail.com wrote: So, I am implementing a page on which words that have hints associated in the DB are binded with the click event to show the Hint. Initially, I go through and replace the words with html that goes span class=hintword/span So, then I bind the hint class with the click event, $(.hint).bind(mouseup,function(e) { var clickElement = e.target; var clickText = $(clickElement).text(); $.post('term.cfc?method=getTermDefreturnFormat=json', {term:clickText},showHint,json);} ) The problem is on IE 7, the first word that is binded, works fine for the first click, but after that the click event for it is not registered. For the rest of the words, the click event works fine. On FF, everything works fine. Any ideas on what could be wrong here?
[jQuery] Re: drag/drop replace text/element
Doh! Thanksheading over there now On Feb 1, 4:04 pm, Richard D. Worth rdwo...@gmail.com wrote: We'd love to help you over on the jQuery UI list: http://groups.google.com/group/jquery-ui Thanks. - Richard On Sun, Feb 1, 2009 at 3:15 PM, coyote...@msn.com webmas...@fantasyplaymakers.com wrote: I'm trying to drag and drop between lists. I have the simple drag and drop down, but I want to add something else... I want drop a list item to another list item and replace the text or the drop zone. For example. I have two lists: ul id=sortable1 class='droptrue' li id=whatever 1 class=ui-state-defaultwhatever 1/li li id=whatever 2 class=ui-state-defaultwhatever 2/li li id=whatever 3 class=ui-state-defaultwhatever 3/li /ul ul id=sortable1 class='droptrue' li id=default text 1 class=ui-state-defaultdefault text 1/li li id=default text 2 class=ui-state-defaultdefault text 2/li li id=default text 3 class=ui-state-defaultdefault text 3/li /ul so if I drag whatever 1 to default text 1 it would replace default text 1 with whatever 1
[jQuery] Re: Cascade (chained) works in Firefox but not in IE
I did attach firebug at one point but couldn't glean anything useful from it. From my google research, the problem has to do with the encoding (UTF-8) and JQuery's handling of special characters. I can't explain why IE breaks while Firefox just displays a strange character... In any case, the solution to this is beyond me. For now it looks like I'm going to have to run my data through a function to replace accented characters with their normal counterparts. I'd be interested to hear from others about possible fixes to this though... On Feb 1, 4:13 pm, Mike Nichols nichols.mik...@gmail.com wrote: have you attached fiddler and firebug to see what it happening? On Feb 1, 10:14 am, James james.tilb...@gmail.com wrote: ...I must add and point out that the EXACT SAME DATA exists in the external file and the inline var. So it is ALSO very strange that the accents as mentioned display correctly in the first example (pulling from the inline var) and don't in the second example (pulling from the external file). I guess this helps to isolate where the problem is occuring? Some parsing routine that only applies to externally-read files? On Feb 1, 12:10 pm, James james.tilb...@gmail.com wrote: Update2: The problematic page is still up as promised for discussion purposes, but I have a breakthrough to report. I never would have suspected this in a million years, but I discovered it after following through with my same line of logic regarding the JSON data causing a problem. I eliminated single quotes and commas from the equation as these worked just fine. However, I thought I would try other characters since I noticed that accented characters were showing up strangely in the dropdown list (see under Quebec - Gaspé, for an example). Where it should say GASPé, it instead shows GASP(question mark inside a diamond). Firefox displays this, IE doesn't display anything but the loading circle graphic. I can fix this by replacing all accented characters in my data with regular alphabet characters, but the question is - why is this causing a problem with the JQuery/IE combination? I would much rather leave accented characters intact. Something in the JQuery routines can't handle these characters and/or is replacing them with a strange character. Any ideas? On Feb 1, 11:46 am, James james.tilb...@gmail.com wrote: Update: It doesn't seem to have anything to do with single quotes or commas, for that matter, inside the JSON data. Now HERE'S something to make you scratch your head: I have now put the complete data file back up in the external file ('CANADA_3.js') and I have ALSO put the EXACT same data file into the static var included inline in the HTML page ('list3'). This is the best demonstration of the problem: The external file and the static var both load fine if using Firefox. Only the static var works for IE. Live page (will not change until further response):http://jamestilberg.com/jquery/ James ? On Feb 1, 11:22 am, James james.tilb...@gmail.com wrote: @Mike Thanks. But it should have been working with the default code since dropdown 2 was working - dropdown 3 used the exact same principle. There is definitely something going on different between FF and IE. Question - Could the existence of single quotes within the JSON data throw off JQuery? example: If one of the cities is O'Brien I ask because I have now put up a refined page with the two methods and I have used a smaller version of the data file and guess what? It now works. So this leads me to believe the JSON data itself may have been causing a problem with IE only (Firefox always worked). http://jamestilberg.com/jquery/ The thing is, I had already validated the JSON data with several different online JSON validators I guess I need to build the JSON file back up and see if something specific stumps JQuery... On Feb 1, 2:01 am, Mike Nichols nichols.mik...@gmail.com wrote: @James Thinking about what you are doing here with the third dropdown...By attaching that dropdown to the second you are telling it to be filtered by the second dropdown's selected value...which is not selected yet since it just loaded so I would presume you shouldn't have any data in the third drop down. To support this behavior in the past I used the 'event' property of the options to define which event actually fires a cascade ( the defalt is 'changed'). Then I manually fire cascade within the parent element's change handler. : //when 'make' is selected... $(.seconddropdown) .cascade(.firstdropdown,{ ajax: 'firsturl.js' }) .bind(change,function() {
[jQuery] unsubscrive
[jQuery] unsubscrive
-- Diego Valobra pirolab WebDesign Roma
[jQuery] Re: toggle checkbox when clicking td
And yet, another way using jQuery-1.2.6. Like Dave Methvin said, there is prolly many ways to do it... var checkIt = function(){ if ($(this).siblings().children().filter(:checkbox).attr (checked)==false) { $(this).siblings().children().filter(:checkbox).attr (checked,checked); } else if ($(this).siblings().children().filter(:checkbox).attr (checked)==true){ $(this).siblings().children().filter(:checkbox).removeAttr (checked); } }; $(td).bind(click, checkIt); Hope that helps, Manowar721 On Jan 31, 4:10 pm, Slafs slaf...@gmail.com wrote: Hi! I would like to write a js script using jQuery which could help me to toggle checkbox. I have one checkbox for each row of table and i would like to simplify the checking and unchecking the boxes by letting user just to click anywhere on the row to do this. I was trying something with children and parent function but it seems to doesn't work. table: table class=myTable tr tdfirst/tdtdrow/td tdinput type=checkbox name=1 value=1/td /tr ... /table my jQ code: $(document).ready(function(){ $(.myTable td).click(function(){ $(this).parent(tr).children (input:checkbox).each(function(){ this.checked = !this.checked; }); }); any help? thanks in advance!
[jQuery] Re: Need to make a edit layout system using php and jquery...?
Check this link = http://ui.jquery.com/ Good Luck, Manowar721 On Feb 1, 3:19 pm, shyhockey...@gmail.com shyhockey...@gmail.com wrote: Hi, I am right now trying to make a edit layout system. basicly I want to know how I can use jquery to grab the height width and position elements are at. Cause I plan to make in the edit mode to allow users to move like images and tables and texts around on the layout and even change background images and add more artistic images for their profiles. I will add also a music player. So I need to know how I can grab all positions height and width of each element on my layout and then store that data. I am planning to make databases for users where I will store their edited stuff. So I need the x and y position of where the elements are at and also the height and width. Some told me I should just grab what css element of height and width and top and left of the elements using javascript. What would you suggest on how I should do it? Can I do it using jquery or no??? Thanks for your time.
[jQuery] jquery.combobox jumping in internet explorer
I've implemented the jquery.combobox plugin (http:// jquery.sanchezsalvador.com/page/jquerycombobox.aspx) on a site (http:// www.powerbuy.com.au). The problem is that when you click on the styled comboboxes in IE, the page jumps down, and sometimes this pushes the combobox off screen. I know this plugin relies on the dimensions plugin, and both the jquery and dimensions plugins are the most recent version. I think this problem has something to do with the celculation of the size of the view port (as the amount this jumps seems to be related to the size of the viewport,with smaller viewports causing this to jump further). Any help would be greatly appreciated.
[jQuery] block on body onload, unblock on at the end of $(document).ready
Hello, I would like to blockUI on body onload like: body onload=$.blockUI({ message: null }); and when document ready finishes unblock, but unfortunately i can not unblock it if I put blockUI on onload of body. My page makes few ajax calls and some processing on document ready, and i want to blockUI until page finishes loading completely. Is there a solution, or a workaround? Best.
[jQuery] Re: about :not(:last)
Gracias, Ricardo! I change the code with the complete test case for my issue Sorry for the identation but the original code is generated and I copy/ paste with firebug If I'm not wrong, with the selector 'dl:not(:last)' SITE dl is incorrect in the returned list because is the last dl (if not 'dl' will be equal to 'dl:not(:last)') am I confused or there is a bug? Thanks! On 1 feb, 21:07, Ricardo Tomasi ricardob...@gmail.com wrote: http://jquery.nodnod.net/cases/85 Parece ok aqui. Pode ser alguma outra coisa na tua página, não dá pra saber sem ver o html. Seems to work fine here. Could you post a complete test page showing this issue? - ricardo On Feb 1, 1:25 pm,Garitogar...@gmail.com wrote: Hi! Please, consider this code: $.fn.url2 = function(absoluta) { var slots = $(this).parents('dl:not(:last)').map(function() { return $(.Texto:first, $(this)).text(); }); var slots2 = $(this).parents('dl').map(function() { return $(.Texto:first, $(this)).text(); }); return slots.get().join(/) + ' -- ' + slots2.get().join(/); }; The funny thing of this code is that slots and slots2 have the same items Could you point me why slots put the last dl? I suppose that dl:not(:last) retrieves all the parents except the last one but this don't work Thanks!
[jQuery] Does anybody make Sifr work with uitabs?
Hello, I have stumbled upon a problem with ui.tabs and Sifr3. If I attempt to use sifr to replace text within a tab, and that tab is hidden, the text never gets converted with Sifr. Sifr works on the first tab which is visible but when I open the next tab the text that supposed to be replaced is not replaced. If anyone success to make SIfr works on the hidden tab as well, please let me know what I can do. Thanks in advance. Slake424
[jQuery] Re: Does anybody make Sifr work with uitabs?
I have got around a similar problem in the past by positioning the element off the screen instead of hiding it. I don't know if this is applicable or not. Cheers, Cam On Mon, Feb 2, 2009 at 2:16 PM, slake424 iamtakashii...@googlemail.comwrote: Hello, I have stumbled upon a problem with ui.tabs and Sifr3. If I attempt to use sifr to replace text within a tab, and that tab is hidden, the text never gets converted with Sifr. Sifr works on the first tab which is visible but when I open the next tab the text that supposed to be replaced is not replaced. If anyone success to make SIfr works on the hidden tab as well, please let me know what I can do. Thanks in advance. Slake424
[jQuery] Re: ajaxForm returns error in IE7
Thanks Brian for the help. I completely forgot that I even posted this and I was searching again for an answer...I saw this post and was like holy crap, that is the same exact problem I am having...wait a minute hahaha. Thanks again. On Dec 9 2008, 11:28 pm, Brian J. Cohen brian.j.co...@gmail.com wrote: Okay, I found a post that the plugin author responded to, that details the problem:http://groups.google.com/group/jquery-en/browse_thread/thread/e52fe0b... Apparently he used certain reserved words that you must avoid in your form element names, like action and method. I had a hidden element named action that I had to rename, and it started working in IE7. FYI, this used to work correctly so I've filed a ticket on it. Still, it's good practice to avoid names that have special meaning. http://dev.jquery.com/ticket/4039 Mike
[jQuery] Re: block on body onload, unblock on at the end of $(document).ready
I would like to blockUI on body onload like: body onload=$.blockUI({ message: null }); and when document ready finishes unblock, but unfortunately i can not unblock it if I put blockUI on onload of body. My page makes few ajax calls and some processing on document ready, and i want to blockUI until page finishes loading completely. Is there a solution, or a workaround? Why can't you unblock it? It's recommended that you do not use an inline event like onload. Instead, use jQuery's ready event: $(document).ready(function() { $.blockUI({ message: null }); // do stuff $.unblockUI(); }); Except in your case, $.unblockUI is probably called from an ajax callback.
[jQuery] Re: Does anybody make Sifr work with uitabs?
Oh my god! Cam Spiers saved my life. I just added position:absolute;left:-1px to the .ui-tabs-hide selector. and it's working on the even the next tab. Thanks you so much! Thank you. Slake424 On Feb 2, 1:22 am, Cam Spiers camspi...@gmail.com wrote: I have got around a similar problem in the past by positioning the element off the screen instead of hiding it. I don't know if this is applicable or not. Cheers, Cam On Mon, Feb 2, 2009 at 2:16 PM, slake424 iamtakashii...@googlemail.comwrote: Hello, I have stumbled upon a problem with ui.tabs and Sifr3. If I attempt to use sifr to replace text within a tab, and that tab is hidden, the text never gets converted with Sifr. Sifr works on the first tab which is visible but when I open the next tab the text that supposed to be replaced is not replaced. If anyone success to make SIfr works on the hidden tab as well, please let me know what I can do. Thanks in advance. Slake424
[jQuery] live and plugins
How would I make live work with plugins? With the livequery plugin i used $('.text-edit').livequery('click', function() { akedit(save_url, options); }); akedit is a not a jquery function. How would I make a plugin work with this Thanks, -Tom
[jQuery] Re: live and plugins
How would I make live work with plugins? With the livequery plugin i used $('.text-edit').livequery('click', function() { akedit(save_url, options); }); akedit is a not a jquery function. How would I make a plugin work with this It should work the same way (unless I misunderstood your question): $('.text-edit').live('click', function() { akedit(save_url, options); });
[jQuery] Re: live and plugins
no your right, i have no idea what i was thinking. I got it working Thanks though On Feb 1, 9:31 pm, Mike Alsup mal...@gmail.com wrote: How would I make live work with plugins? With the livequery plugin i used $('.text-edit').livequery('click', function() { akedit(save_url, options); }); akedit is a not a jquery function. How would I make a plugin work with this It should work the same way (unless I misunderstood your question): $('.text-edit').live('click', function() { akedit(save_url, options); });
[jQuery] tabs, ui.panel
Hi, What is a real meaning of ui.panel object in tabs related events? It is HTMLDivElement but how to get some more useful info from that? regards, Piotr
[jQuery] Re: Possible remote and/or messages bug
I accidentally sent my reply direct to the first responder, here is a summary re-post: Aside from the remote= tag on the form field as described in the original post, there isn't much to the form itself. The only thing I left out that might be of value is the script snippet that initializes the validation, here it is: script type=text/javascript $(document).ready(function(){ $(#form1).validate({messages: {email: {required:Please use a different e-mail address.}},errorClass: invalid,errorPlacement: function(error, element){ error.parent().insertBefore(element); }} ); }); /script I tested the form under FF 3.0.5 and IE 7.0 On Jan 30, 9:07 pm, James james.gp@gmail.com wrote: Could you provide more information, like code and browser specs? On Jan 30, 2:21 pm,WizADSLwiza...@gmail.com wrote: I wanted to post this here first and see if anyone has seen this. This is easy to reproduce. The Prep: Create a form with a few fields, on form field 2 add remote=somepasge.htm and make it required, create somepage.htm and put true as the only content of the page and of course set the for to validate. This is a basic form that would use the remote feature to check with the server, and the field will always be valid as long is is not empty. The problem: In yourvalidatefunction call, add a messages entry for field 2 and (this can be require, remote, etc) then submit the form, so far so good. Now, if you hit back in the browser and hit submit again, the form will not submit (but the remote check will fire), if you hit submit a second time, it will go. If you remove the messages entry for the field from thevalidatefunction call and try everything again it works fine every time (no second submit needed). It seems that having a messages entry for a field when using remote will cause incorrect behavior if the form is re-submitted.- Hide quoted text - - Show quoted text -
[jQuery] Load JSON, Use It via Callback, Then Destroy?
I'm repeatedly loading data via JSON every 2 seconds or so to keep a page updated. Each time data is returned. I take the data, update a list (the list can only have 5 items) and then never reference the data again. If I let this run for an hour, it crashes Safari. Looking at the inspector palette, it looks as if every document is loaded and stays loaded. I'm basically poking around at this point, but my thought was that I need to somehow unload the JSON data that was loaded (and the associated function that appears to be created as the callback) after I'm done with that data. Is that the right way to think about it? If so, how do I do that? I can't seem to figure out how to reference the data object to remove() it. Thanks!
[jQuery] Re: jQuery UI Tabs Flash
On Jan 12, 9:29 am, tlphipps tra...@brandyandtravis.com wrote: This is because of how browsers work. What's happening is that the browser is downloading all the HTML and beginning to display it. Then when the DOM is 'ready', jquery is running the code you've specified which creates the tab interface. To avoid this issue you have to use CSS to 'hide' the content that you don't want displayed on page load. So if you have 3 tabs, you would use standard CSS to 'hide' (display: none) the 2nd and 3rd tabs so the browser would never display them to begin with. Then when the tabs load, jquery takes over showing/hiding the content. I tried hiding the content, but then it doesn't show. I'm a little confused on what's going on.
[jQuery] Re: toggle checkbox when clicking td
Yeah, what Dave said. Also, I wrote a tutorial a couple months ago about this very topic: http://www.learningjquery.com/2008/12/quick-tip-click-table-row-to-trigger-a-checkbox-click --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Feb 1, 2009, at 4:20 PM, Dave Methvin wrote: now the checkbox itself doesn't have the ability to check or uncheck What's happening is that when you click the checkbox directly, it changes the state of the checkbox. But, the click event then bubbles to the tr, where the handler changes it (back)! There are several different ways to handle this problem. One would be to put an event handler on every checkbox that would return false to stop bubbling and prevent it from reaching your tr handler. If you are using jQuery 1.3.1 you can use event delegation and the .closest() method. That's nice because it only involves a single event handler on the table. $(.myTable).click(function(e){ var $chk = $(e.target).closest(tr).find(:checkbox); if ( $chk[0] != e.target ) $chk.attr(checked, !$chk.attr(checked)); }); If the handler sees that the actually clicked element (e.target) is a checkbox, it doesn't toggle the state since the direct click took care of it. In the other cases where the enclosing td or tr is clicked, it manually toggles the state of the enclosed checkbox.
[jQuery] Re: jQuery and Javascript timer question
Ricardo and Brian both explained that .is('.btn px') tests for a px element inside an element with class=btn - not an element with class=btn px. You don't have a px element, do you? If not, then your code that sets the background color is never being executed. Try putting an alert() or a console.log() in that code and see if it gets there. To illustrate further, try these tests in Firebug: $('div class=btn px/div').is('.btn px') returns false. $('div class=btnpx/px/div').children().is('.btn px') returns true. -Mike From: thertze...@gmail.com Right but you can have to classes defined to one element, and thats what is being done here. The statement does validate nonetheless, but rather why this.css doesn't correctly reassign the background is what im unsure of. On Feb 1, 12:20 pm, brian bally.z...@gmail.com wrote: On Sun, Feb 1, 2009 at 12:09 PM, thertze...@gmail.com thertze...@gmail.com wrote: what? That statement checks to see if the element clicked has the class of .btn px, I dont know what your saying, the statement there does work correctly, its \$(this).css({ backgroundColor:color }); that isnt modifying the css, thats where my problems are. Class names cannot have spaces. Ricardo is correct; the selector you're using is for a px element inside of another with classname 'btn'. It's being ran from perl, so when perl is parsing the print statement, it thinks $~whatever is a perl variable. Which is strange, because normally use strict; will bark at you, but instead perl finds a way to find out what $~whatever is. Its kinda strange, so I have to escape them server side, but client side they come out as normal $ Sure it requires escaping for Perl. But, effectively, you're posting a Perl print statement, not JS. Post the actual, real lines of code, as it will be when it meets the interpreter. Any format it's in before it reaches the browser is unimportant and just getting in the way. Just view source and copy that. Next, people will be posting their gzipped scripts to be debugged. ;-)
[jQuery] Re: jQuery and Javascript timer question
And, to clarify further, the selector for elements with both 'btn' 'px' classes[1] is '.btn.px'. Note that there's a dot before both class names. There's also no space--'.btn .px' would select for an element with classname 'px' inside of another with classname 'btn'. Remember that jQuery's classname and ID selectors mirror those found in your stylesheets, not your element attributes. [1] Of course, either '.btn' or '.px' would work, also but '.btn.px' is what's required to narrow it down to elements with both. On Mon, Feb 2, 2009 at 12:21 AM, Michael Geary m...@mg.to wrote: Ricardo and Brian both explained that .is('.btn px') tests for a px element inside an element with class=btn - not an element with class=btn px. You don't have a px element, do you? If not, then your code that sets the background color is never being executed. Try putting an alert() or a console.log() in that code and see if it gets there. To illustrate further, try these tests in Firebug: $('div class=btn px/div').is('.btn px') returns false. $('div class=btnpx/px/div').children().is('.btn px') returns true. -Mike From: thertze...@gmail.com Right but you can have to classes defined to one element, and thats what is being done here. The statement does validate nonetheless, but rather why this.css doesn't correctly reassign the background is what im unsure of. On Feb 1, 12:20 pm, brian bally.z...@gmail.com wrote: On Sun, Feb 1, 2009 at 12:09 PM, thertze...@gmail.com thertze...@gmail.com wrote: what? That statement checks to see if the element clicked has the class of .btn px, I dont know what your saying, the statement there does work correctly, its \$(this).css({ backgroundColor:color }); that isnt modifying the css, thats where my problems are. Class names cannot have spaces. Ricardo is correct; the selector you're using is for a px element inside of another with classname 'btn'. It's being ran from perl, so when perl is parsing the print statement, it thinks $~whatever is a perl variable. Which is strange, because normally use strict; will bark at you, but instead perl finds a way to find out what $~whatever is. Its kinda strange, so I have to escape them server side, but client side they come out as normal $ Sure it requires escaping for Perl. But, effectively, you're posting a Perl print statement, not JS. Post the actual, real lines of code, as it will be when it meets the interpreter. Any format it's in before it reaches the browser is unimportant and just getting in the way. Just view source and copy that. Next, people will be posting their gzipped scripts to be debugged. ;-)
[jQuery] Trying to get CrossSlide plugin to work
I'm trying to implement the CrossSlide plugin with Drupal and I'm not having any luck. Based on some help I got from this group, I have this code that sets a different banner depending on the URL in script.js (at www.oregonpatrolservice.com): Drupal.behaviors.setBanner = function (context) { var img = { '/content/about-us': 'images/OPS-Banner-02.jpg', '/content/services': 'images/OPS-Banner-03.jpg', '/content/ops-armory': 'images/OPS-Banner-04.jpg', '/content/careers': 'images/OPS-Banner-07.jpg', '/contact': 'images/OPS-Banner-08.jpg', '/user': 'images/OPS-Banner-05.jpg' }[location.pathname] || 'OPS-Banner-01.jpg'; $(td#header).css(background,url(/sites/all/themes/theme060/ images/ + img + ) no-repeat); }; So I have the jquery.cross-slide.js file included in the header, and this code in script.js: Drupal.behaviors.crossSlideBanner = function (context) { $('td#header').crossSlide({ sleep: 5, //in sec fade: 2//in sec }, [ { src: 'images/OPS-Banner-01.jpg'}, { src: 'images/OPS-Banner-02.jpg'}, { src: 'images/OPS-Banner-03.jpg'}, { src: 'images/OPS-Banner-04.jpg'}, { src: 'images/OPS-Banner-05.jpg'}, { src: 'images/OPS-Banner-06.jpg'}, { src: 'images/OPS-Banner-07.jpg'}, { src: 'images/OPS-Banner-08.jpg'}, { src: 'images/OPS-Banner-09.jpg'}, { src: 'images/OPS-Banner-10.jpg'} ]); }; But I get nothing displayed. The only thing I can think of is that my original script sets the background property of td#header, where CrossSlide replaces the content of td#header. Even so, it seems that I should see something at least. Can anyone tell me what I'm missing? Thanks. Steve
[jQuery] Re: jQuery UI Tabs Flash
Add the class ui-tabs-hide to your panels beforehand. I will not encourage bad practice (usage of inline styles). Note to self: Make FAQ for this. --Klaus On 2 Feb., 05:38, Chris cpot...@siolon.com wrote: On Jan 12, 9:29 am, tlphipps tra...@brandyandtravis.com wrote: This is because of how browsers work. What's happening is that the browser is downloading all the HTML and beginning to display it. Then when the DOM is 'ready', jquery is running the code you've specified which creates the tab interface. To avoid this issue you have to use CSS to 'hide' the content that you don't want displayed on page load. So if you have 3 tabs, you would use standard CSS to 'hide' (display: none) the 2nd and 3rd tabs so the browser would never display them to begin with. Then when the tabs load, jquery takes over showing/hiding the content. I tried hiding the content, but then it doesn't show. I'm a little confused on what's going on.
[jQuery] Re: tabs, ui.panel
I think I've answered to that question already somewhere else, but here we go. Yes, ui.panel is a reference to the div DOM node that contains the content of a tab. You can do with it whatever you want to/ can do with a DOM node, for example wrap it in a jQuery object or retrieve its id (ui.panel.id). Other than that I don't understand your question. Could you explain what kind of information you wish to retrieve from that node? --Klaus On 2 Feb., 04:27, pejot pjonar...@gmail.com wrote: Hi, What is a real meaning of ui.panel object in tabs related events? It is HTMLDivElement but how to get some more useful info from that? regards, Piotr
[jQuery] Re: Does anybody make Sifr work with uitabs?
http://docs.jquery.com/UI/Tabs#...my_slider.2C_Google_Map.2C_etc._not_work_when_placed_in_a_hidden_.28inactive.29_tab.3F --Klaus On 2 Feb., 02:37, slake424 iamtakashii...@googlemail.com wrote: Oh my god! Cam Spiers saved my life. I just added position:absolute;left:-1px to the .ui-tabs-hide selector. and it's working on the even the next tab. Thanks you so much! Thank you. Slake424 On Feb 2, 1:22 am, Cam Spiers camspi...@gmail.com wrote: I have got around a similar problem in the past by positioning the element off the screen instead of hiding it. I don't know if this is applicable or not. Cheers, Cam On Mon, Feb 2, 2009 at 2:16 PM, slake424 iamtakashii...@googlemail.comwrote: Hello, I have stumbled upon a problem with ui.tabs and Sifr3. If I attempt to use sifr to replace text within a tab, and that tab is hidden, the text never gets converted with Sifr. Sifr works on the first tab which is visible but when I open the next tab the text that supposed to be replaced is not replaced. If anyone success to make SIfr works on the hidden tab as well, please let me know what I can do. Thanks in advance. Slake424
[jQuery] Dynamic url in ajax call based on select value
I'm kind of scratching my head over this. Okay, so let's say I want to dynamically load a specific JSON flat file (could be xml, whatever) depending on the current select box: jQuery(#chained_sub_child).cascade(#chained_child,{ ajax: {url: $(select#chained).val() }, template: commonTemplate, match: commonMatch }); If the VALUE in the #chained select box was, let's say, pizza, jQuery would go ahead and attempt to load a file named pizza. But let's say I want to append an extension to pizza. For example I want pizza.json, or pizza_1.js. How do I get this extra string text into the ajax option above? I have tried + notation, various combinations of brackets, etc. But I just can't get it to work and can't find appropriate documentation anywhere on this. Any ideas? Thanks, James