[jQuery] Re: A better way to do this?
".find()" should help $(this).find("ul > li > a").each( )
[jQuery] Re: Check checkbox based on ID list
If you're able to do that, why not have the server just put the attribute in the HTML in the first place? -Mike > From: hubbs > > I figured it out, I just had my server write the jQuery attributes: > > $("#12").attr("checked", "checked"); > > On Aug 22, 11:58 am, hubbs <[EMAIL PROTECTED]> wrote: > > There is also the option of me putting the checked values into an > > array if that would help with this... > > > > On Aug 22, 11:27 am, hubbs <[EMAIL PROTECTED]> wrote: > > > > > I am looking for ideas on how to check some checkboxes based on a > > > list of id's that match the id's of the checkboxes. > > > > > Example: > > > > > > > > 10, 14, 11 > > > > > > > > > > > > > type="checkbox" value="1" id="11" name="11" /> > > type="checkbox" value="1" id="12" name="12" /> > > type="checkbox" value="1" id="13" name="13" /> > > type="checkbox" value="1" id="14" name="14" /> > > > > > In this example, when the page loads, I need the checkboxes with > > > id's 10, 14, and 11 to be checked, and the rest to remain > unchecked. > > > The values in checkedValues come from the server, so I need to > > > mirror these with a checked value if that id comes up within the > > > checkedValues div. > > > > > I know there must be an easy, or better way to do this, > just looking > > > for ideas. Thanks! >
[jQuery] Re: Add a class only to the first parent
$('.menu:first').addClass("bar"); On Aug 24, 3:24 pm, Massimiliano Marini <[EMAIL PROTECTED]> wrote: > Hi all, > > I need some help, I want to apply a class with 'addClass' at all of > the first and not to the second > > Example: > > > 1 > 2 > > > 3 > 4 > > > > > How can I achieve this? Is possible without using the each() function? > Any help, suggestions, examples are welcome. > -- > Massimiliano Marini -http://www.linuxtime.it/massimilianomarini/ > "It's easier to invent the future than to predict it." -- Alan Kay
[jQuery] Re: Appreciation
Wasn't expecting Devo, but I thought more like Motley Crue. --- On Sun, 8/24/08, Michael Geary <[EMAIL PROTECTED]> wrote: From: Michael Geary <[EMAIL PROTECTED]> Subject: [jQuery] Re: Appreciation To: jquery-en@googlegroups.com Date: Sunday, August 24, 2008, 9:54 PM Not only that, but we have a theme song! Here we come, Scripting down the street, Just trying to be friendly, To everyone we meet, Hey hey we're jQuery, People say we query around, But we're too busy coding, To put anybody down. (You were expecting Devo?) -Mike > From: john6630 > > As a newbie, I want to express my appreciation to the code > authors and the members who provide such fantastic support. > As a newbie, I also joined the javascript group and am amazed > at the difference. Here all is positive and supportive while > over there they are negative and contentious (not to mention > they bad mouth jQuery a lot). > > So many thanks, > John
[jQuery] Appreciation
As a newbie, I want to express my appreciation to the code authors and the members who provide such fantastic support. As a newbie, I also joined the javascript group and am amazed at the difference. Here all is positive and supportive while over there they are negative and contentious (not to mention they bad mouth jQuery a lot). So many thanks, John
[jQuery] Re: Appreciation
Not only that, but we have a theme song! Here we come, Scripting down the street, Just trying to be friendly, To everyone we meet, Hey hey we're jQuery, People say we query around, But we're too busy coding, To put anybody down. (You were expecting Devo?) -Mike > From: john6630 > > As a newbie, I want to express my appreciation to the code > authors and the members who provide such fantastic support. > As a newbie, I also joined the javascript group and am amazed > at the difference. Here all is positive and supportive while > over there they are negative and contentious (not to mention > they bad mouth jQuery a lot). > > So many thanks, > John
[jQuery] Re: Livequery and iFrames
I worked on another, simpler example of reloading the listing with a link, and I get the same unwanted results. In the iframe: $("#refreshB").click(function() { $.ajax({ type: "GET", url: "http://www.mysite.com";, beforeSend: function() { $("#adminToolsListingB .scroll", parent.document).html(""); $("#adminToolsListingB .ajaxLoading", parent.document).show(); }, success: function(html) { $("#adminToolsListingB .ajaxLoading", parent.document).hide(); $("#adminEditListingB .scroll", parent.document).html(html); } }); return false; }); The link: Refresh Still not rebinding the events in the parent frame. I am missing something here? It seems that this should work, as it is updating the DOM in the parent frame correctly, and I would expect Livequery to see that, and rebind. On Aug 24, 4:02 pm, hubbs <[EMAIL PROTECTED]> wrote: > I am trying to track down a problem, and I am wondering if it has to > do with iFrames. > > I use livequery to rebind some the jQuery UI draggable event to a list > of links. I have an ajax refresh button, which refreshes the list, > and livequery rebinds the draggable events, which works great. > > But, I have an iFrame on the page which will create a new link within > that list. So, after the form is submitted in the iframe, it uses > the .ajax() GET method to reload the list of links in the parent > window, exactly how the ajax refresh button works. But, it seems that > livequery is not rebinding the UI draggable events, and I am wondering > if it is because the change came from the iFrame. > > Does this seem like it could be the problem, or should I keep digging? > > This one works: > $.ajax({ > type: "GET", > url: "http://www.mysite.com";, > beforeSend: function() { > $("#adminToolsListingA .scroll").html(""); > $ > ("#adminToolsListingA .ajaxLoading").show(); > }, > success: function(html) { > $ > ("#adminToolsListingA .ajaxLoading").hide(); > $ > ("#adminEditListingA .scroll").html(html); > } > }); > > This one does not: > $.ajax({ > type: "GET", > url: "http://www.mysite.com";, > beforeSend: function() { > $("#adminToolsListingB .scroll", > parent.document).html(""); > $("#adminToolsListingB .ajaxLoading", > parent.document).show(); > }, > success: function(html) { > $("#adminToolsListingB .ajaxLoading", > parent.document).hide(); > $("#adminEditListingB .scroll", > parent.document).html(html); > } > }); > > Livequery binding draggable UI: > $("#adminEditListingB .itemHolder a").livequery(function() { > $(this).draggable({ > helper: 'clone', > appendTo: 'body', > cursor: 'move' > }); > });
[jQuery] Re: How do I cache a page once it has been loaded via AJAX?
When I am loading content for view as things are clicked or expanded, I just hide the content until it is ready to be viewed, then toggle it into view.
[jQuery] Re: Accordion + load dynamic JSON data
Heh, Yeah AFTER posting then it hit me...I just have to attach an onClick to the and begin the loading process :-/ duh. Oh well, thanks anyways. :-p JQuery rocks! Dave On Aug 24, 7:09 pm, "David D." <[EMAIL PROTECTED]> wrote: > Hi there, > > I just started making great use of the JQuery UI components and must > admit, they are *awesome*. I am however having some trouble trying to > figure out how to modify my accordion code so that I can support > dynamic loading of content. > > So for example when the user clicks to load the accordion bar it > should open up and display a "Loading conversation" message then > actually render the JSON data in a particular way. > > I was thinking of tackling this by calling a function which adds the > loading message into the panel div. Make the JSON request then replace > the div information with my HTML. > > What I'm wondering is how can I detect when the panel is triggered? > Moreover I need to pass a piece of information to the JSON request > that will know what to look for. You see I'm trying to use accordion > as a make-shift thread viewer, so when the person clicks on it should > pass the thread ID, retrieve the thread information then place it in > the panel. > > I've look at the docs and I can't seem to find anything that would > help me. Maybe I should take a diff. approach? > > Thanks, > > David
[jQuery] Re: Selecting text nodes
Thanks for the quick response, Karl. I'm not sure if this would quite do it--It looks like you can get an array of the contents of the text nodes, and you could do a .replace() on those array elements, but I'm not sure how you would then insert the new text back into the text nodes. It seems like a selector like the ones in the Selectors part of the API doc would be the ideal route. Any ideas? -Tom On Aug 24, 5:28 pm, Karl Swedberg <[EMAIL PROTECTED]> wrote: > I wrote a plugin that may help: > > http://plugins.learningjquery.com/textchildren/ > > --Karl > > > Karl Swedbergwww.englishrules.comwww.learningjquery.com > > On Aug 24, 2008, at 4:20 PM, Tom B. wrote: > > > > > Does anyone have code for a text node selector? I saw this post: > >http://groups.google.com/group/jquery-en/browse_thread/thread/2dda271... > > > but the function textNodes didn't seem to work with the current > > version of jQuery. I'm a bit new to jQuery, but I ultimately want to > > do a regex find and replace on all of the text nodes in a tree (the > > function needs to select children, grandchildren, etc), so any tips on > > the best way to do that would be greatly appreciated. > > > Many thanks, > > Tom
[jQuery] Re: Add a class only to the first parent
> $('.menu:first').addClass("bar"); Thanks to you and Olaf, the right way was: $(".menu:first > li").addClass("bar"); I know it was so easy, but thanks 1k :) -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ "It's easier to invent the future than to predict it." -- Alan Kay
[jQuery] Re: Add a class only to the first parent
Massimiliano Marini schrieb: I need some help, I want to apply a class with 'addClass' at all of the first and not to the second ah sorry after reading better ;) $("#foo > .menu > li:not(.expanded)").addClass("bar"); or so $("#foo > .menu > li").addClass("bar"); see what better for you, the first exclude expanded LI -- Viele Grüße, Olaf --- [EMAIL PROTECTED] http://olaf-bosch.de/ http://ohorn.info/ http://www.akitafreund.de/ ---
[jQuery] Re: A better way to do this?
Gracias amigo, that did the trick! I knew it was simple ;-) On Aug 24, 4:27 pm, MorningZ <[EMAIL PROTECTED]> wrote: > ".find()" should help > > $(this).find("ul > li > a").each( > > )
[jQuery] Re: Can't get css png fix plugin to work....
what do I have to do to get the script to work??? all I done was add it to the html page using
[jQuery] Sortables Update Still Showing Old Sort Position (With New Position)
Here's the code: $("#sort1").sortable({ connectWith: ['#sort2', '#sort3'], revert: true, items: '.groupItem', handle: '.itemHeader', placeholder: 'moduleSortHelper', start: function(e, ui) { ui.helper.css("width", ui.item.width()); }, update: function(e, ui) { $("#sort1").sortable("refreshPositions"); alert(ui.item.find(".moduleId").text()); $("#sort1").find(".groupItem").each(function() { alert("1: " + $(this).find(".moduleId").text()); }); } }); $("#sort2").sortable({ connectWith: ['#sort1', '#sort3'], revert: true, items: '.groupItem', handle: '.itemHeader', placeholder: 'moduleSortHelper', start: function(e, ui) { ui.helper.css("width", ui.item.width()); }, update: function(e, ui) { $("#sort2").sortable("refreshPositions"); alert(ui.item.find(".moduleId").text()); $("#sort2").find(".groupItem").each(function() { alert("2: " + $(this).find(".moduleId").text()); }); } }); $("#sort3").sortable({ connectWith: ['#sort1', '#sort2'], revert: true, items: '.groupItem', handle: '.itemHeader', placeholder: 'moduleSortHelper', start: function(e, ui) { ui.helper.css("width", ui.item.width()); }, update: function(e, ui) { $("#sort3").sortable("refreshPositions"); alert(ui.item.find(".moduleId").text()); $("#sort3").find(".groupItem").each(function() { alert("3: " + $(this).find(".moduleId").text()); }); } }); When I sort the item, it alerts its previous position as well as its new position. I tried using "refreshPositions" but that doesn't seem to fix this issue. Any thoughts/suggestions?
[jQuery] Accordion + load dynamic JSON data
Hi there, I just started making great use of the JQuery UI components and must admit, they are *awesome*. I am however having some trouble trying to figure out how to modify my accordion code so that I can support dynamic loading of content. So for example when the user clicks to load the accordion bar it should open up and display a "Loading conversation" message then actually render the JSON data in a particular way. I was thinking of tackling this by calling a function which adds the loading message into the panel div. Make the JSON request then replace the div information with my HTML. What I'm wondering is how can I detect when the panel is triggered? Moreover I need to pass a piece of information to the JSON request that will know what to look for. You see I'm trying to use accordion as a make-shift thread viewer, so when the person clicks on it should pass the thread ID, retrieve the thread information then place it in the panel. I've look at the docs and I can't seem to find anything that would help me. Maybe I should take a diff. approach? Thanks, David
[jQuery] Livequery and iFrames
I am trying to track down a problem, and I am wondering if it has to do with iFrames. I use livequery to rebind some the jQuery UI draggable event to a list of links. I have an ajax refresh button, which refreshes the list, and livequery rebinds the draggable events, which works great. But, I have an iFrame on the page which will create a new link within that list. So, after the form is submitted in the iframe, it uses the .ajax() GET method to reload the list of links in the parent window, exactly how the ajax refresh button works. But, it seems that livequery is not rebinding the UI draggable events, and I am wondering if it is because the change came from the iFrame. Does this seem like it could be the problem, or should I keep digging? This one works: $.ajax({ type: "GET", url: "http://www.mysite.com";, beforeSend: function() { $("#adminToolsListingA .scroll").html(""); $ ("#adminToolsListingA .ajaxLoading").show(); }, success: function(html) { $ ("#adminToolsListingA .ajaxLoading").hide(); $ ("#adminEditListingA .scroll").html(html); } }); This one does not: $.ajax({ type: "GET", url: "http://www.mysite.com";, beforeSend: function() { $("#adminToolsListingB .scroll", parent.document).html(""); $("#adminToolsListingB .ajaxLoading", parent.document).show(); }, success: function(html) { $("#adminToolsListingB .ajaxLoading", parent.document).hide(); $("#adminEditListingB .scroll", parent.document).html(html); } }); Livequery binding draggable UI: $("#adminEditListingB .itemHolder a").livequery(function() { $(this).draggable({ helper: 'clone', appendTo: 'body', cursor: 'move' }); });
[jQuery] Re: Add a class only to the first parent
Massimiliano Marini schrieb: I need some help, I want to apply a class with 'addClass' at all of the first and not to the second How can I achieve this? Is possible without using the each() function? Any help, suggestions, examples are welcome. $("#foo > .menu").addClass("bar"); you have not closed second UL *valid!!! Example:* 1 2 3 4 -- Viele Grüße, Olaf --- [EMAIL PROTECTED] http://olaf-bosch.de/ http://ohorn.info/ http://www.akitafreund.de/ ---
[jQuery] Re: Doc's site down?
Themeroller is unusable today.
[jQuery] Using instead of with Superfish
Hi, Thanks to Joel for creating Superfish. It has eliminated many headaches for me. My implimentation is almost complete, but my lack of javascript knowledge is showing (the CSS is tough enough for me). I have a like so: first category item 1 item 2 first category item 1 item 2 Home I would like to automatically put an arrow next to "first category" as well as "second category" but superfish only seems to put arrows next to links. I assume I need to change this: addArrow = function($a) { $a.addClass(c.anchorClass).append($arrow.clone()); }; or this (the addArrow section): return this.each(function() { var s = this.serial = sf.o.length; var o = $.extend({},sf.defaults,op); o.$path = $ ('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){ $(this).addClass([o.hoverClass,c.bcClass].join(' ')) .filter('li:has(ul)').removeClass(o.pathClass); }); sf.o[s] = sf.op = o; $('li:has(ul)',this)[($.fn.hoverIntent && !o.disableHI) ? 'hoverIntent' : 'hover'](over,out).each(function() { if (o.autoArrows) addArrow( $('>a:first-child',this) ); }) .not('.'+c.bcClass) .hideSuperfishUl(); var $a = $('a',this); $a.each(function(i){ var $li = $a.eq(i).parents('li'); $a.eq(i).focus(function(){over.call($li);}).blur(function() {out.call($li);}); }); o.onInit.call(this); Any help would be very much appreciated. -Joe
[jQuery] Re: Doc's site down?
So slow at the moment, they keep timing out. > (I would love to know who the host is so I will be sure to avoid > them). It seems jQuery's host is "RimuHosting" http://rimuhosting.com/ — but they only offer VPS/Dedicated so it's not as if this can be pinned as the host's fault… looks like jQuery needs some more servers (I can see why they aren't giving them though with the expense)…
[jQuery] Re: Can't get css png fix plugin to work....
well this is what I done: I put in html:http://www.mydomain.com/sharedscripts/alphapngfixforIE.js";> that was it. Do I have to do more then just inlcuding it?? On Aug 23, 3:24 am, "Rene Veerman" <[EMAIL PROTECTED]> wrote: > did you initialize the script after loading it? > > On Fri, Aug 22, 2008 at 8:06 PM, Aaron <[EMAIL PROTECTED]> wrote: > > > Hi I just tried getting the plugin for jquery it's called cssPNGfix > > it's supposed to fix the problems with IE for tranparent png files. > > > any suggestions how to get this to work?? I included the jquery main > > file and also the fix javascript. > > > I don't understand if it needs/depends on any other scripts??
[jQuery] Add a class only to the first parent
Hi all, I need some help, I want to apply a class with 'addClass' at all of the first and not to the second Example: 1 2 3 4 How can I achieve this? Is possible without using the each() function? Any help, suggestions, examples are welcome. -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ "It's easier to invent the future than to predict it." -- Alan Kay
[jQuery] Re: [validate] Form doesn't show in IE
You've got an illegal trailing comma somewhere in the code that gets loaded when clicking on Kontakt oss. Firebug doesn't give a useful line number, but this message should help to spot it: trailing comma is not legal in ECMA-262 object initializers [Break on this error] },messages: {\n Enable strict warnings via Web Developer Toolbar to have Firebug display those. Jörn On Sun, Aug 24, 2008 at 6:43 PM, flopp <[EMAIL PROTECTED]> wrote: > > I'm using jquery with validation and form plugin. > All my forms works in FF, but in IE the site is blank. > > URL: > http://test.mittskift.no/ > Click on "Kontakt oss" in the top-menu. >
[jQuery] Release: Tooltip Plugin 1.3
Hi, I'd like to announce a small update for the http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/";>jQuery tooltip plugin. The support for image maps is back, the deprecated $.fn.Tooltip is gone (just use tooltip() instead), and two new features: A fade option, which takes the duration to fade in/out a tooltip in milliseconds. And the positionLeft-option, which configures the plugin to display the tooltip on the left of the cursor. From the changelog: Added fade option (duration in ms) for fading in/out tooltips; IE <= 6 is excluded when bgiframe plugin is included Fixed imagemaps in IE, added back example Added positionLeft-option - positions the tooltip to the left of the cursor Remove deprecated $.fn.Tooltip in favor of $.fn.tooltip Have fun! Jörn
[jQuery] Re: attr('onclick','') problem on ie6
That simply doesn't work on IE. Use bind() instead. -- Ariel Flesler http://flesler.blogspot.com/ On Aug 24, 8:41 am, Sarbesh <[EMAIL PROTECTED]> wrote: > Hi, > > i'm new to jquery and i'm having some problem. > > the code below works fine in FF3.0 but doesn't work with IE 6.0. > i used it to show and hide table row when user click the show/hide > icon > > id and a_id are dynamic ids. > > id will be something like #23, and a_id like #id_23 > > function show_hidden_row(id,a_id){ > $(id).show(); > $(a_id).removeAttr("onclick"); > $(a_id).attr("onclick","hide_shown_row('"+id+"','"+a_id+"')"); > $(a_id).html(''); > > } > > function hide_shown_row(id,a_id){ > $(id).hide(); > $(a_id).removeAttr("onclick"); > $(a_id).attr("onclick","show_hidden_row('"+id+"','"+a_id+"')"); > $(a_id).html(''); > > } > > Can anybody please help me to fix this problem.
[jQuery] Re: jquery is not defined (newbie)
Looks like you are not properly refrencing the jquery script. You should have an entry in your header that looks like [code] [/code] except the src should point to YOUR jquery file. On Aug 24, 10:12 am, Scott Phillips <[EMAIL PROTECTED]> wrote: > I am trying to get datepicker plugin (http://eyecon.ro/datepicker/ > #about) to work on a page, and I can't get it to work for some reason. > I keep getting the following 2 errors: > > jQuery is not defined > datepicker.js()()datepicker.js (line 819) > [Break on this error] })(jQuery); > > datepicker.js (line 819) > $("#inputDate").DatePicker is not a function > [Break on this error] onChange: function(formated, dates){ > > I'm positive that the paths to jquery, etc.. are correct. This is the > code I am using to call the datepicker: > > > $(document).ready(function(){ > > $('#inputDate').DatePicker({ > format:'m/d/Y', > date: $('#inputDate').val(), > current: $('#inputDate').val(), > starts: 1, > position: 'r', > onBeforeShow: function(){ > $('#inputDate').DatePickerSetDate($('#inputDate').val(), > true); > }, > onChange: function(formated, dates){ > $('#inputDate').val(formated); > } > > }); > > }); > > > Any help is greatly appreciated!
[jQuery] Re: Selecting text nodes
I wrote a plugin that may help: http://plugins.learningjquery.com/textchildren/ --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Aug 24, 2008, at 4:20 PM, Tom B. wrote: Does anyone have code for a text node selector? I saw this post: http://groups.google.com/group/jquery-en/browse_thread/thread/2dda27130338f1af/b04adcf147e15ab1 but the function textNodes didn't seem to work with the current version of jQuery. I'm a bit new to jQuery, but I ultimately want to do a regex find and replace on all of the text nodes in a tree (the function needs to select children, grandchildren, etc), so any tips on the best way to do that would be greatly appreciated. Many thanks, Tom
[jQuery] Re: Doc's site down?
The site was excrutiatingly slow for me yesterday and today. Fortunately I have bookmarked other sites which provide documentation. But it is really a bad advertisement for jQuery when its own site performs so badly!! Maybe someone could setup a "for pay" site with a nominal annual fee and get a better provider. I would be willing to pay a small fee to obtain better support and any excess could be used to support the overall jQuery effort. But, again, it is very frustrating to have such poor performance continually with this site. (I would love to know who the host is so I will be sure to avoid them). On Aug 24, 9:24 am, Sudara <[EMAIL PROTECTED]> wrote: > Hi there! > > Anyone else have somewhat regular issues withhttp://docs.jquery.com/ > being regularly slow and/or unavailable over the last few months? > > Especially during PST mornings, it seems to consistently drag. > > Sudara
[jQuery] A better way to do this?
Hey All, What's a better way to write: $(this).children('ul').children('li').children('a').each(function() { // Stuff here... }); I tried: $(this).children('ul > li > a').each(function() { // Stuff here... }); But its not returning the correct results. Im sure this is easy, could someone point me in the right direction? Cheers, Dana
[jQuery] Selecting text nodes
Does anyone have code for a text node selector? I saw this post: http://groups.google.com/group/jquery-en/browse_thread/thread/2dda27130338f1af/b04adcf147e15ab1 but the function textNodes didn't seem to work with the current version of jQuery. I'm a bit new to jQuery, but I ultimately want to do a regex find and replace on all of the text nodes in a tree (the function needs to select children, grandchildren, etc), so any tips on the best way to do that would be greatly appreciated. Many thanks, Tom
[jQuery] Re: jQuery 1.2.6 event.altKey is undefined
thanks again, you may close the ticket I opened yesterday regarding this (http:// dev.jquery.com/ticket/3284) On Aug 24, 9:51 pm, "Brandon Aaron" <[EMAIL PROTECTED]> wrote: > It has already been fixed in SVN. If you don't want to use the SVN version > then simply reference the altKey property like this: > event.originalEvent.altKey > > -- > Brandon Aaron > > On Sun, Aug 24, 2008 at 1:06 PM, Tzury <[EMAIL PROTECTED]> wrote: > > > The latest version that behave correctly is 1.2.4. > > How could I submit a fix for this issue? > > > On Aug 23, 8:50 pm, Tzury <[EMAIL PROTECTED]> wrote: > > > problem: > > > event.altKey is undefined. > > > > environment: > > > Linux/ FF 3.0.1 / jQuery-1.2.6 > > > > remark: > > > when I am using older version (1.1.4) everything works fine. > > > > The following markup along with firebug will be handy to capture it. > > > > > > > > > > http://jqueryjs.googlecode.com/files/ > > > jquery-1.2.6.js"> > > > > > > $(document).ready(function (){ > > > $.event.add(document, 'keydown', showEventDetails); > > > }); > > > function showEventDetails(event){ > > > console.log("Alt:%s", event.altKey); > > > } > > > > > > > > > > > > > > >
[jQuery] Re: jQuery 1.2.6 event.altKey is undefined
> It has already been fixed in SVN. If you don't want to use the SVN version > then simply reference the altKey property like this: > event.originalEvent.altKey thanks for the information - that props copying line was the problem. anyway, in my case for the matter of backward (and forward) compatibility I will add event.altKey = event.originalEvent.altKey; (it broke my plug-in jquery.hotkeys)
[jQuery] Re: SUPERFISH Supersubs problem in mozilla firefox
I had initially set the font-size using pixels in 3 places in the css. I switched those over to em units. However, this problem is still happening in Firefox. I also have been going over every bit of code in the js, the css, and the html, and I am stumped. The example on the superfish page using supersubs works in all browsers, so I copied it all over and tried again, to no avail. Any ideas folks? Does anyone in these parts know who created this Super Subs plug in and how I could contact them? Thanks a lot! Andy On Jul 31, 5:25 am, "Joel Birch" <[EMAIL PROTECTED]> wrote: > @andy: I notice that the sub-widths are being set to the maxWidth > value that you are initializing Supersubs with. This suggests to me > that the wrong font size is probably being arrived at by the plugin so > that when it calculates the em width based upon the font size it > arrives at a far larger number than it should - triggering the > maxWidth feature. I wish I had the time to look into this now, but > unfortunately I am too busy. You might want to try tweaking the CSS > for how you are setting the font-size and/or experimenting to see if > the same bug occurs with a different font. I'll get to testing it > myself, but I can't say when. > > @Kollin: I'd advise against those workarounds. If you want to apply a > specific width to individual submenus, you should replace your inline > style attribute with unique ids or classes on the li elements that > contain them. Then set the width for each one, and it's child ul, from > within the CSS. > Also, you mentioned cross-browser problems when adding > padding/margin/border to the li element, but you should not be doing > that at all. You should add those things to the anchor elements only, > as shown in the Superfish demo CSS files. This avoids any > cross-browser issues and keeps things simple. > > Joel Birch.
[jQuery] Re: jQuery 1.2.6 event.altKey is undefined
The latest version that behave correctly is 1.2.4. How could I submit a fix for this issue? On Aug 23, 8:50 pm, Tzury <[EMAIL PROTECTED]> wrote: > problem: > event.altKey is undefined. > > environment: > Linux/ FF 3.0.1 / jQuery-1.2.6 > > remark: > when I am using older version (1.1.4) everything works fine. > > The following markup along with firebug will be handy to capture it. > > > > http://jqueryjs.googlecode.com/files/ > jquery-1.2.6.js"> > > $(document).ready(function (){ > $.event.add(document, 'keydown', showEventDetails); > }); > function showEventDetails(event){ > console.log("Alt:%s", event.altKey); > } > > > > >
[jQuery] Re: jQuery 1.2.6 event.altKey is undefined
It has already been fixed in SVN. If you don't want to use the SVN version then simply reference the altKey property like this: event.originalEvent.altKey -- Brandon Aaron On Sun, Aug 24, 2008 at 1:06 PM, Tzury <[EMAIL PROTECTED]> wrote: > > The latest version that behave correctly is 1.2.4. > How could I submit a fix for this issue? > > > On Aug 23, 8:50 pm, Tzury <[EMAIL PROTECTED]> wrote: > > problem: > > event.altKey is undefined. > > > > environment: > > Linux/ FF 3.0.1 / jQuery-1.2.6 > > > > remark: > > when I am using older version (1.1.4) everything works fine. > > > > The following markup along with firebug will be handy to capture it. > > > > > > > > http://jqueryjs.googlecode.com/files/ > > jquery-1.2.6.js"> > > > > $(document).ready(function (){ > > $.event.add(document, 'keydown', showEventDetails); > > }); > > function showEventDetails(event){ > > console.log("Alt:%s", event.altKey); > > } > > > > > > > > > > >
[jQuery] weird behavior with show()
Hello all, I could really use some insight in this. I am using the following jquery to show a menu on hover. The issue is that if you do not hover the link until the menu is completely shown, it pops up underneath. It's probably best if you just see what it does: http://www.chrisrockwell.com/csphoto. The portfolio and information links will behave very weirdly if you just run the mouse across them. I really appreciate any help that is offered. Thanks much. $(document).ready(function() { // find class .sub-menu-present and add hover $('lo#portfolio-link').css('display', 'none'); $('lo#information-link').css('display', 'none'); $('li#portfolio-link').hover( function() { $('ul.portfolio').css('display', 'none').show(1000); }, function() { $('ul.portfolio').css('display', 'none'); } ); $('li#information-link').hover( function() { $('ul.information').css('display', 'none').show(1000); }, function() { $('ul.information').css('display', 'none'); } ); })
[jQuery] [validate] Form doesn't show in IE
I'm using jquery with validation and form plugin. All my forms works in FF, but in IE the site is blank. URL: http://test.mittskift.no/ Click on "Kontakt oss" in the top-menu.
[jQuery] Re: Safari 3 working locally but not on the web.
Looks like a fun site! The Google ads code that you have is script after the head is closed but before the body is opened. That won't validate. Also, there are several tags that aren't closed properly if you're using an XHTML doctype. Maybe Safari is picky about that? http://validator.w3.org/
[jQuery] Re: How dynamically create iframe and add/remove data from it
Personally, I try not mixing jquery components with standard javascript (like your document.createElement), with the exception of within functions. Somebody else can probably comment on what is appropriate. I'd write this something like [code] $('#container').append(''); $('#commentiframe').attr('src', 'http:LINK'); [/code] that should create the iFrame and get a document. But you say you want to create an iFrame and then put data into it. I'm not sure you can do that, or you would be able to inject stuff into somebody elses page, theoretically on there server. THOUGH I COULD BE VERY WRONG on this. If you are just trying to get data and display it, why not just update a div?
[jQuery] Re: Interface plugin SortableAddItem on dynamic content...
Interface hasn't been supported for a very long time, so you're not going to find any help on this. You should consider using jQuery UI http://ui.jquery.com On Aug 20, 10:39 pm, sergeh <[EMAIL PROTECTED]> wrote: > hey guys, > > been trying to make this work but haven't been successful yet, I was > wondering what I was doing wrong... > > basically I have a div groupWrapper where all of my "items" are > contained and whenever something is added it's appended to the > groupWrapper > > The problem is that only the first item is draggable, but I can make > it switch places with all of the other items. > > this is what my items look like > > > Question {0} > > > > > > and whenever the Add button is pressed itemHeader and itemContent gets > replicated so in the add function I also have > > $("div.groupWrapper").SortableAddItem($('#question'+newId)); > > where newId is just an incremented value that corresponds to the next > question id that just got loaded on the page > > any ideas why this isn't working?
[jQuery] Re: Doc's site down?
Hi there! Anyone else have somewhat regular issues with http://docs.jquery.com/ being regularly slow and/or unavailable over the last few months? Especially during PST mornings, it seems to consistently drag. Sudara
[jQuery] Re: Getting name of element in $.each, when used on object?
And... yeah. That does it. Embarrassing, but I guess I've not used for..in before, and didn't realize what it did. I do now :-) Much obliged. On Aug 24, 9:13 am, Evan <[EMAIL PROTECTED]> wrote: > Try this: > > var i = 0; > var s = ''; > for (var prop in o) > { > if (i > 0) > s += '&'; > > s += prop + '=' + o[prop]; > ++i;} > > alert(s); > > On Aug 24, 5:12 pm, "Josh Rosenthal" <[EMAIL PROTECTED]> wrote: > > > Hey Folks, > > > Probably a rather basic question here, but my attempts at figuring it out > > have come to no success. > > > I'm using $.each to loop through the attributes of an object, and write them > > out into a string. The object contains a series of parameters that will be > > passed through a url (for a geoserver WFS should anyone care). Is there any > > way to get the name of the attribute so that it can be used as a string? > > > Mockup object: > > { > > request: "getfeature", > > typename: "massgis:TOWNS", > > propertyname: "TOWN_ID,PARCEL_STATUS", > > cql_filter: "INTERSECT(SHAPE,POINT(-72.22%2041.00)" > > > } > > > Goal is to generate something like > > &request=getfeature&typename=massGIS:TOWNS&propertyname= > > > Unfortunately, I can't seem to get 'request' and 'typename' etc. Anything > > obvious I'm missing, or is this truly impossible? > > > Thanks a lot, > > Josh
[jQuery] Re: Cache problem
Shot in the dark here... make sure script tag has type="text/javascript" if that's not the issue, server configuration? --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Aug 20, 2008, at 4:57 PM, regent wrote: My js files are being cached as HTML Documents instead of JScript. And this I causing, I believe, all of my pages to load slowly. Is there any reason why js files would be cached as HTML? How can this be fixed? Thanks for any help.
[jQuery] Re: nth-child() vs. even/odd
On Aug 23, 2008, at 11:11 PM, Dave Methvin wrote: In contrast, :nth-child(even) selects the even children of the element(s) in the jQuery object. Just to clarify, :nth-child(even) selects all elements in the jQuery object that are the even children of their parent. For example, $('td:nth-child(even)') selects all elements that are the even children of a . So, given this snippet ... one two three four five six ... $('td:even') selects #one, #three, and #five $('td:nth-child(even)') selects #two and #five --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Aug 23, 2008, at 11:11 PM, Dave Methvin wrote: No, they're definitely not equivalent in the general case. The :even and :odd selectors apply to the even/odd elements in the jQuery object. Depending on what has come earlier in the selector, those elements may not even be related in any way. In contrast, :nth-child(even) selects the even children of the element(s) in the jQuery object. The example in the documentation does a pretty good job of demonstrating this: http://docs.jquery.com/Selectors/nthChild
[jQuery] Re: Issue Related to Interface.js plugin with on jQuery 1.2.6 in Internet Explorer.6
Yes, jQuery UI should contain all the functionality you're looking for. If there are unsupported features, feel free to create tickets asking for the desired functionality. On Aug 20, 2:24 pm, AQuery <[EMAIL PROTECTED]> wrote: > Thanks for the info, > > Does UI plugin has all the features that are there in Interface.js > > example the something like sortSerialize etc. (Just being lazy :-))
[jQuery] Re: attr('onclick','') problem on ie6
Your totally removing the onclick, so when your trying to modify it, it no longer exists. function show_hidden_row(id,a_id){ $(id).show(); $(a_id).attr("onclick","hide_shown_row('"+id+"','"+a_id+"')"); $(a_id).html(''); } --- On Sun, 8/24/08, Sarbesh <[EMAIL PROTECTED]> wrote: From: Sarbesh <[EMAIL PROTECTED]> Subject: [jQuery] attr('onclick','') problem on ie6 To: "jQuery (English)" Date: Sunday, August 24, 2008, 7:41 AM Hi, i'm new to jquery and i'm having some problem. the code below works fine in FF3.0 but doesn't work with IE 6.0. i used it to show and hide table row when user click the show/hide icon id and a_id are dynamic ids. id will be something like #23, and a_id like #id_23 function show_hidden_row(id,a_id){ $(id).show(); $(a_id).removeAttr("onclick"); $(a_id).attr("onclick","hide_shown_row('"+id+"','"+a_id+"')"); $(a_id).html(''); } function hide_shown_row(id,a_id){ $(id).hide(); $(a_id).removeAttr("onclick"); $(a_id).attr("onclick","show_hidden_row('"+id+"','"+a_id+"')"); $(a_id).html(''); } Can anybody please help me to fix this problem.
[jQuery] Re: Best practices for including Jquery
I rarely see a situation where the javascript should be or needs to be placed anyplace else but the head of the document(Well, except for advertising). But I think it also might have to factor into how a webpage is built. If you have a header, left nav, right nav, but only need a script for the main content and not for every page than I might write the script inside of the content(include) page, although I don't like doing that cause it's considered, non-compliant. As for best practices all js and css includes should be placed within the head of the document with very few exceptions. POV. http://2whoa.com/dominate --- On Sun, 8/24/08, bradvin <[EMAIL PROTECTED]> wrote: From: bradvin <[EMAIL PROTECTED]> Subject: [jQuery] Best practices for including Jquery To: "jQuery (English)" Date: Sunday, August 24, 2008, 8:50 AM I have been wondering where others feel its best to include jquery and other .js files in the html. Include it in the HEAD or at the end of the html document just before you close the BODY tag? There are arguments for including it at the end of the document so that the dom is fully loaded by the time the javascript loads, but that argument falls away with jquery's ready event. So is it truly beneficial at the end? So far i have been including all my .js files in the HEAD with no problems, as well as all my page specific ready script. what are others doing and why do you choose to do it that way?
[jQuery] Re: jQuery.forms javascript in response ignored ?
If it's a large amount of code then put in on pastie.org or somewhere like that. But it is much easier to help you if you can create a simple example and host it so we can see it in action and use a debugger. Mike On Aug 24, 4:41 am, Alexey <[EMAIL PROTECTED]> wrote: > No. It's not hosted yet. > I can post whole html/scripts both on the page and from the server- > response > Will it help ? > > On Aug 23, 9:55 am, Mike Alsup <[EMAIL PROTECTED]> wrote: > > > Can you post a link to a test page? > > > > I do $("").ajaxSubmit(...,mySuccessCallback) > > > > In the sever response I have not only html code but also some > > > javascript that should be executed. > > > > > > > ... > > > ... > > > > > > > but in the mySuccessCallback function in the 'response' field I get > > > only html without script. And obviously it's not executed. > > > > > > > ... > > > > > > > Any ideas how to make it work ?
[jQuery] attr('onclick','') problem on ie6
Hi, i'm new to jquery and i'm having some problem. the code below works fine in FF3.0 but doesn't work with IE 6.0. i used it to show and hide table row when user click the show/hide icon id and a_id are dynamic ids. id will be something like #23, and a_id like #id_23 function show_hidden_row(id,a_id){ $(id).show(); $(a_id).removeAttr("onclick"); $(a_id).attr("onclick","hide_shown_row('"+id+"','"+a_id+"')"); $(a_id).html(''); } function hide_shown_row(id,a_id){ $(id).hide(); $(a_id).removeAttr("onclick"); $(a_id).attr("onclick","show_hidden_row('"+id+"','"+a_id+"')"); $(a_id).html(''); } Can anybody please help me to fix this problem.
[jQuery] Re: jQuery countdown
instead of "div" you can use "span" Je mag weer spelen over !
[jQuery] Re: jQuery countdown
instead of "div" you can use "span" Je mag weer spelen over ! hopefully this will do it..
[jQuery] Re: Getting name of element in $.each, when used on object?
Try this: var i = 0; var s = ''; for (var prop in o) { if (i > 0) s += '&'; s += prop + '=' + o[prop]; ++i; } alert(s); On Aug 24, 5:12 pm, "Josh Rosenthal" <[EMAIL PROTECTED]> wrote: > Hey Folks, > > Probably a rather basic question here, but my attempts at figuring it out > have come to no success. > > I'm using $.each to loop through the attributes of an object, and write them > out into a string. The object contains a series of parameters that will be > passed through a url (for a geoserver WFS should anyone care). Is there any > way to get the name of the attribute so that it can be used as a string? > > Mockup object: > { > request: "getfeature", > typename: "massgis:TOWNS", > propertyname: "TOWN_ID,PARCEL_STATUS", > cql_filter: "INTERSECT(SHAPE,POINT(-72.22%2041.00)" > > } > > Goal is to generate something like > &request=getfeature&typename=massGIS:TOWNS&propertyname= > > Unfortunately, I can't seem to get 'request' and 'typename' etc. Anything > obvious I'm missing, or is this truly impossible? > > Thanks a lot, > Josh
[jQuery] Re: idiot alert!!! stupid jeditable question
On Aug 18, 2008, at 3:08 PM, Chris Hall wrote: Sorry for the stupid question, but can someone help me understand what I need to do to with jeditable (great plugin!) so when my text area data is submitted the line breaks are converted to br tags, but when the user edits the same text area again the br tags become line breaks again? One way is to convert newlines to br by using function as data parameter. For example: $(".editable").editable("http://www.example.com/save.php";, { type : "textarea", submit : "OK", data: function(value, settings) { var retval = value.replace(//gi, '\n'); return retval; } }); -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Getting name of element in $.each, when used on object?
Hey Folks, Probably a rather basic question here, but my attempts at figuring it out have come to no success. I'm using $.each to loop through the attributes of an object, and write them out into a string. The object contains a series of parameters that will be passed through a url (for a geoserver WFS should anyone care). Is there any way to get the name of the attribute so that it can be used as a string? Mockup object: { request: "getfeature", typename: "massgis:TOWNS", propertyname: "TOWN_ID,PARCEL_STATUS", cql_filter: "INTERSECT(SHAPE,POINT(-72.22%2041.00)" } Goal is to generate something like &request=getfeature&typename=massGIS:TOWNS&propertyname= Unfortunately, I can't seem to get 'request' and 'typename' etc. Anything obvious I'm missing, or is this truly impossible? Thanks a lot, Josh
[jQuery] Best practices for including Jquery
I have been wondering where others feel its best to include jquery and other .js files in the html. Include it in the HEAD or at the end of the html document just before you close the BODY tag? There are arguments for including it at the end of the document so that the dom is fully loaded by the time the javascript loads, but that argument falls away with jquery's ready event. So is it truly beneficial at the end? So far i have been including all my .js files in the HEAD with no problems, as well as all my page specific ready script. what are others doing and why do you choose to do it that way?
[jQuery] Re: autocmplete working ( kinda)
Try to delimit columns within the response with a pipe |. Eg. William Huestis|Un - Employed|51544 William Edwards|Un - Employed|51482 Jörn On Sat, Aug 23, 2008 at 1:23 AM, larksys <[EMAIL PROTECTED]> wrote: > > Ok, here's a link to a test page; > > http://www.taxsearchinc.com/test/index.cfm > > If you type charles w you will see one of the problems > > > > On Aug 22, 5:13 pm, "Jörn Zaefferer" <[EMAIL PROTECTED]> > wrote: >> Yes, reformulating your question could help a lot. Usually a testpage >> with a short description of the context and the issue is best. >> >> Jörn >> >> On Fri, Aug 22, 2008 at 11:27 PM, larksys <[EMAIL PROTECTED]> wrote: >> >> > Guess I should have asked it >> > differently. >> >> > On Aug 21, 10:07 pm, larksys <[EMAIL PROTECTED]> wrote: >> >> I finally am beginning to understand some of this. It took a little >> >> bit for the fact that variable "q" was being passed and not the id of >> >> the input element. And it's right there in the documentation. I've >> >> tested my query and it give the results I want. But the results passed >> >> to the autocomplete are strange. If I type "charles w" I get "Charles >> >> Wade" but there are 7 more matches in the backend query. And, >> >> following the one item returned, I get code like; >> >> .debug >> >> { >> >> color:black; >> >> background-color:white; >> >> >> Am I not delimiting the list properly? >> >> >> >> >> >> >> script> >> >>