[jQuery] Re: adding event to dynamic element

2009-11-21 Thread mofle
You're doing it wrong, and you don't need to use live. I tested this, and it works: var $results = $('#ajaxSearchResults'); $('

[jQuery] Re: Adding some buttons and callbacks

2009-11-19 Thread VANJ
Anyone? Thanks

[jQuery] Re: Adding selectors to $(this)?

2009-10-19 Thread Matt
Thanks James, the context parameter was what I needed. ui.item is an object returned by Sortable containing the elements used in sorting. On Oct 13, 10:40 pm, James wrote: > The jquery selector has a second parameter > 'context':http://docs.jquery.com/Core/jQuery#expressioncontext > > such tha

[jQuery] Re: Adding selectors to $(this)?

2009-10-14 Thread Richard D. Worth
On Tue, Oct 13, 2009 at 6:49 AM, Matt wrote: > > What I want, though, is to add this class to the within my . > I tried: > > receive: function(event, ui) { >$(ui.item + ' h3').addClass('editable'); > $(ui.item).find('h3').addClass('editable'); - Richard

[jQuery] Re: Adding selectors to $(this)?

2009-10-13 Thread James
The jquery selector has a second parameter 'context': http://docs.jquery.com/Core/jQuery#expressioncontext such that if defined it will only select what's a descendant of that element. You can also use find(): http://docs.jquery.com/Traversing/find#expr By the way, what is ui.item? An object? (C

[jQuery] Re: Adding Multi-Tier to Drop Menu?

2009-10-09 Thread ehime
I was injecting this into the code, it Origionally was not there. [code] $(this).find('ul:first:hidden').css({visibility: "visible",display: "none"}).show(400); $(this).find('ul:first').css({visibility: "hidden"}); [/code] I had taken a menu system that I liked and

[jQuery] Re: Adding Multi-Tier to Drop Menu?

2009-10-09 Thread ehime
I was injecting this into the code, it Origionally was not there. [code] $(this).find('ul:first:hidden').css({visibility: "visible",display: "none"}).show(400); $(this).find('ul:first').css({visibility: "hidden"}); [/code] I had taken a menu system that I liked and

[jQuery] Re: Adding Multi-Tier to Drop Menu?

2009-10-08 Thread Charlie
taking a stab at this, code seems quite strange to me First- check your context of "this" , in your span.hover you have a "this" looking for a child of the span that is a UL sildedown().show()  - not necessary, slidedown already takes a hidden element and "shows" it the css keeps functionin

[jQuery] Re: adding filters in the middle of a selector brings Firebugs warning

2009-10-07 Thread BaBna
Sorry, the message is "Unknown pseudo-class or pseudo-element 'first'".

[jQuery] Re: adding click event

2009-07-23 Thread gil
Can you provide sample code or a link? On 23 jul, 14:47, shaf wrote: > Hi Guys > > I have just inserted some content into my html page and now Im trying > to add event listeners for some of the links in the inserted content > but nothing happens. Do I need to update something before I can add a

[jQuery] Re: Adding element to an array of object

2009-07-19 Thread Theodore Ni
Something simple (without any error checking) like the following works for me: Object Array var parArr = new Array('par1', 'par2', 'par3', 'par4'); var valArr = new Array('val1', 'val2', 'val3', 'val4'); function addKeysValues(original, newkeys, newvals) { for (var i = 0; i < newkeys.lengt

[jQuery] Re: adding rule to selector syntax

2009-07-01 Thread Charlie
$('[id^=total_item]').not('.locked') introvert wrote: Hello I have a simple jquery selector: $('[id^=total_item]') I would like to add a rule so that the upper code would match all elements that don't have 'locked' class (so that it wouldnt match those with class='locked'). How should

[jQuery] Re: adding $("

2009-05-21 Thread Liam Byrne
If you're outputting it to a HTML page, then all of the "<" characters should be "<" and all of the ">" characters should be ">" That will prevent them from being actual tags. L Paul Tarjan wrote:

[jQuery] Re: adding $("

Not unexpected at all, as you're appending an element. The usual element behaviour is to run the script inside it. And it has no display either. You should probably use text() as Dave suggested, it will not interpret the angled brackets - same result as if you used HTML entities. cheers, ricard

[jQuery] Re: adding $("

If you don't want your script to be executed, don't use a

[jQuery] Re: adding $("

> I don't want to execute it. I want to print it out to the html page so the > user knows how to embed this stuff on their page. It sounds like you want .text() then. That will not interpret html code.

[jQuery] Re: adding $("

I don't want to execute it. I want to print it out to the html page so the user knows how to embed this stuff on their page. If you actually run the code in the OP, it DOES execute, which was very unexpected. On 5/20/09 2:58 AM, "Ricardo" wrote: > > I don't see the point. That script tag you

[jQuery] Re: adding $("

I don't see the point. That script tag you added is not going to be evaluated anytime, it will just sit there doing nothing. You'll have to move it to the head to execute it. On May 20, 2:17 am, Paul Tarjan wrote: > I actually wanted to append the text to the document. Here is how I'm > working

[jQuery] Re: adding $("

I actually wanted to append the text to the document. Here is how I'm working around it, but I thought building up the tags using jquery functions was the preferred method. var embed = $("").append( $("") .text(data) .attr("i

[jQuery] Re: Adding/Removing text on texarea

If you select the text area and use the text() function on it, you'll get a string back. You can do whatever you want with it from there and then just reinsert it again, thats one option at least cheers Michael Lawson Development Lead, Global Solutions, ibm.com Phone: 1-276-206-8393 E-mail: m

[jQuery] Re: adding $("

Script elements are not really appended. To ensure execution you have to append them to the head of the document or eval them. jQuery does the latter, so the element ends up not being in the DOM at all. What are you trying to achieve? There's no point in creating a script tag when you can just dec

[jQuery] Re: Adding new table rows on the fly?

This is assuming "#second" is a tag $("#second").clone().after('#second'); http://docs.jquery.com/Manipulation On May 15, 12:48 pm, ScottChiefBaker wrote: > Do you know if you can clone() and then appendTo() a > > http://www.perturb.org/tmp/test.html > > I want to something like > > $("#sec

[jQuery] Re: Adding properties to $.ajax(options)

There is not an error, I was just wondering if this is frowned upon. On Apr 17, 8:32 am, Raja Koduru wrote: > don't see any.. > what is the error you are experiencing? > > - raja koduru > > On Fri, Apr 17, 2009 at 5:30 PM, blasto333 wrote: > > > $.ajax({ > > type: "GET", > > url: prefix+url, >

[jQuery] Re: Adding properties to $.ajax(options)

There is not an error, I was just wondering if this is frowned upon. On Apr 17, 8:32 am, Raja Koduru wrote: > don't see any.. > what is the error you are experiencing? > > - raja koduru > > On Fri, Apr 17, 2009 at 5:30 PM, blasto333 wrote: > > > $.ajax({ > > type: "GET", > > url: prefix+url, >

[jQuery] Re: Adding properties to $.ajax(options)

don't see any.. what is the error you are experiencing? - raja koduru On Fri, Apr 17, 2009 at 5:30 PM, blasto333 wrote: > > $.ajax({ > type: "GET", > url: prefix+url, > success: script_saved, > custom_property : someVar > }); > > Is there anything wrong with this?

[jQuery] Re: Adding incremental numbered classes to divs

I just finished documentation on a new plugin I think might help you in this situation. Check out: http://eric.garside.name/docs.html?p=replicator On Apr 13, 11:04 pm, Brain Lava wrote: > Thanks everyone!  You've definitely made some great points for me to > consider.  I'm really new to scriptin

[jQuery] Re: Adding incremental numbered classes to divs

Thanks everyone! You've definitely made some great points for me to consider. I'm really new to scripting (normally I can find plugins to do what I want) and you're probably right that there is a much easier solution to what I'm trying to achieve. I'm going to take your suggestions and see what

[jQuery] Re: Adding incremental numbered classes to divs

Thanks everyone! You've definitely made some great points for me to consider. I'm really new to scripting (normally I can find plugins to do what I want) and you're probably right that there is a much easier solution to what I'm trying to achieve. I'm going to take your suggestions and see what

[jQuery] Re: Adding scope support to .bind()

I'm not sure what all is involved/required for calling .unbind() to be honest. Wouldn't it just be this._input.unbind('change') ? or are there additional parameters required? If it needs a fn reference, that's what hitch() returns ... var cb = $.hitch(this, "_change"); this._input.bind('change',

[jQuery] Re: Adding scope support to .bind()

> this._input.bind('change', $.hitch(this, "_onInputChange")); How do you unbind the ‘hitched’ method? On Apr 8, 11:04 pm, pete higgins wrote: > My hitch() method does this kind of: > > http://higginsforpresident.net/js/jq.hitch.js > > It would look like: > > this._input.bind('change', $.hitch(

[jQuery] Re: Adding incremental numbered classes to divs

Since you're not using the class for styling, but indexing, why not just use the natural index of the div in its container, or from the jQuery object itself? $('.ngg-gallery-thumbnail-box') is an array-like object, so you can iterate over it, or access its members by index number, such as $ ('.ng

[jQuery] Re: Adding incremental numbered classes to divs

Can you use an ordered list? elements are block level just like divs. -Hector On Thu, Apr 9, 2009 at 1:46 PM, Eric Garside wrote: > > What's the advantage of assigning the identifier to the class? Like, > how are you using it once you create the classes. I'm assuming there's > an easier soluti

[jQuery] Re: Adding incremental numbered classes to divs

What's the advantage of assigning the identifier to the class? Like, how are you using it once you create the classes. I'm assuming there's an easier solution, especially if you're doing it dynamically. On Apr 9, 2:54 pm, Brain Lava wrote: > Thanks Ralph!  I'll give that a try :) > > On Apr 9, 1

[jQuery] Re: Adding incremental numbered classes to divs

Thanks Ralph! I'll give that a try :) On Apr 9, 10:13 am, Ralph Whitbeck wrote: > You can use .each to iterate through each div element and increment the > classname or ID via it's index. > > $("div").each(function(i) { >     $(this).addClass("classname" + i); > > }); > > http://docs.jquery.com

[jQuery] Re: Adding incremental numbered classes to divs

Normally I would agree with you but the effect I'm trying to achieve is based on the location of the image in the grid and not tied to the image itself. I don't want the end user to have to update the CSS every time they move an image or add a new one to their gallery. This seemed like the best

[jQuery] Re: Adding incremental numbered classes to divs

You can use .each to iterate through each div element and increment the classname or ID via it's index. $("div").each(function(i) { $(this).addClass("classname" + i); }); http://docs.jquery.com/Core/each HTH Ralph On Thu, Apr 9, 2009 at 9:37 AM, brian wrote: > > That seems like you're fi

[jQuery] Re: Adding incremental numbered classes to divs

That seems like you're fighting against the convention. Why create a zillion classes when these same divs already have an incremented ID? (The ID being the proper place to do this sort of thin, in the 1st place) On Thu, Apr 9, 2009 at 1:31 AM, Brain Lava wrote: > > I'm really new to jQuery and

[jQuery] Re: Adding scope support to .bind()

+1 The ability to specify the scope to a handler function would be a great addition to jQuery core. On Apr 8, 12:03 pm, gregory wrote: > the only difficulty I am having with > Balazs Endresz's approach (which I have also > implemented in my environment) is if another developer passes a > functio

[jQuery] Re: Adding scope support to .bind()

My hitch() method does this kind of: http://higginsforpresident.net/js/jq.hitch.js It would look like: this._input.bind('change', $.hitch(this, "_onInputChange")); Regards, Peter Higgins On Wed, Apr 8, 2009 at 12:03 PM, gregory wrote: > > the only difficulty I am having with > Balazs Endresz

[jQuery] Re: Adding scope support to .bind()

the only difficulty I am having with Balazs Endresz's approach (which I have also implemented in my environment) is if another developer passes a function as 'data' param, the results become unpredictable. Though I don't *think* anybody should be passing a function to access as event.data, it curr

[jQuery] Re: adding columns to table row

by the way - tables are for laying out tabular data, an unordered list with a list-style-type:none; is a much better bet for horizontal navigation. it'll work in basically the same way first second third etc. On Apr 8, 11:29 am, "ryan.j" wrote: > to add a new column append a TD t

[jQuery] Re: adding columns to table row

to add a new column append a TD to each TR (or change the colspan of a TD in each row you didn't modify). you were doing this firstsecond when you probably want to be doing something like... firstsecond $('tr#row_1').append('second');

[jQuery] Re: adding columns to table row

to add a new column append a TD to each TR (or change the colspan of a TD in each row you didn't modify). you were doing this when you probably want to be doing something like... $('tr#row_1').append('second'); On Apr 8, 5:33 am, skunkwerk wrote: > Hi, >    i'm trying to make a really bas

[jQuery] Re: adding columns to table row

to add a new column append a TD to each TR (or change the colspan of a TD in each row you didn't modify). you were doing this when you probably want to be doing something like... $('tr#row_1').append('second'); On Apr 8, 5:33 am, skunkwerk wrote: > Hi, >    i'm trying to make a really bas

[jQuery] Re: Adding scope support to .bind()

>From the updated jQuery 1.4 Roadmap: > If you need a different object for the scope, why not use the data argument > to transport it? In OOP-style applications the handler is often not an anonymous function but a link to the current objects's prototype method: this._input.bind('change', this._

[jQuery] Re: Adding images from one div to another (this is pretty simple..)

Thanks adelf :) I've got it to work now On Mar 13, 3:40 pm, adelf wrote: > $("div#images_all a:has(img)").click(function() > { >  if($(this).data('added')) return false; > >  $($(this).html()).appendTo("div#images_select").dblclick( function() > { $(this).remove(); } ); > >  $(this).data('added'

[jQuery] Re: Adding images from one div to another (this is pretty simple..)

$("div#images_all a:has(img)").click(function() { if($(this).data('added')) return false; $($(this).html()).appendTo("div#images_select").dblclick( function() { $(this).remove(); } ); $(this).data('added', 1); return false; }); I did not test this code, but it should work. Anyway the idea

[jQuery] Re: Adding images from one div to another (this is pretty simple..)

$("div#images_all a:has(img)").click(function() { if($(this).data('added')) return false; $($(this).html()).appendTo("div#images_select").dblclick( function() { $(this).remove(); } ); $(this).data('added', 1); return false; }); I did not test this code, but it should work. Anyway the idea

[jQuery] Re: Adding values from a variable number of select drop downs

function weightTotal(){ var total = 0; $('.weight').each(function(){ total += +$(this).val(); //if it's an empty string +"" == 0 }); $('#grand_total').html( total + "%" ); } cheers, - ricardo On Mar 6, 9:58 pm, shallowman wrote: > Hello all, > > I am trying to add the values

[jQuery] Re: Adding values from a variable number of select drop downs

temp is undefined, so you're adding undefined to the first value in your loop. Set temp = 0; Also, unless you're planning on using it elsewhere, you don't need to assign var obj. And, is there any reason you're using document.getElementById("grand_total").innerHTML instead of $ ('grand_total').ht

[jQuery] Re: Adding additional callbacks to image slides

S3Slider Plugin(JQuery) does what you want,http://www.serie3.info/s3slider/ sharp looking demos too   HM-User wrote: I have a number of image slides which are fading in and out and I am also using the pager option (jQuery Cycle). What I want to know however is, is it possible to invoke

[jQuery] Re: adding html to tab labels

however... when i add another image in the tab which has an anchor tag (delete button for tab) the css explodes and the tab goes all ugly... On Feb 25, 10:29 am, Paul Georges wrote: > solved... wasn't liking my floating divs... > > On Feb 25, 9:48 am, Paul Georges wrote: > > > i'm trying to add

[jQuery] Re: adding html to tab labels

solved... wasn't liking my floating divs... On Feb 25, 9:48 am, Paul Georges wrote: > i'm trying to add some html to the label area of tabs in order to add > an icon and also some divs that i can access at later times to modify > easily. > > any suggestions on how to do this? > > at the moment i

[jQuery] Re: adding tabs dynamically

yup figured it out, thanks guys finally i don't change the template... i do something like this. // add a tab with the the nick specified $("#tabs").tabs('add' , '#' + tag, '' + nick + ''); // correct the holding div $("#" + tag).attr("style", "width: 95%; height: 80%;"); // add the content $("

[jQuery] Re: adding more pictures to existing script

It seems there is an animation (of 3 hero images) on your homepage and also there is an image slide. Some jquery plugin according to this code: $(".slide>ul>li").css("display","block"); $.getScript("assets/js/mousewheel.plugin.js"); $.getScript("assets/js/ufslide.pl

[jQuery] Re: Adding scope support to .bind()

Passing handler after scope is not suitable for two reasons: 1. There's no way to determine whether data or scope is passed in a three-argument method call. 2. Passing scope after handler is common pattern in JavaScript 1.6 methods like forEach. On Dec 25 2008, 11:08 pm, "Eduardo Lundgren" wrot

[jQuery] Re: adding tabs dynamically

You could add that to the template. Or use the add callback to populate the tab: $('#whatever').tabs({ add: function(event, ui) { $(ui.panel).html( ... ) .find('input'); // do something with these inputs } }); It seems you have to use the add callback anyway to get to

[jQuery] Re: adding tabs dynamically

awesome, thanks. can't believe i missed that one. and as for the content of the tab? if i wanted a tab to always have two textboxes, should i modify the template? and then who would i access these two input boxes dynamically? thanks heaps paul On Feb 21, 12:41 am, Klaus Hartl wrote: > Why don

[jQuery] Re: adding tabs dynamically

awesome, thanks. can't believe i missed that one. and as for the content of the tab? if i wanted a tab to always have two textboxes, should i modify the template? and then who would i access these two input boxes dynamically? thanks heaps paul On Feb 21, 12:41 am, Klaus Hartl wrote: > Why don

[jQuery] Re: adding tabs dynamically

awesome, thanks. can't believe i missed that one. and as for the content of the tab? if i wanted a tab to always have two textboxes, should i modify the template? and then who would i access these two input boxes dynamically? thanks heaps paul On Feb 21, 12:41 am, Klaus Hartl wrote: > Why don

[jQuery] Re: adding tabs dynamically

Why don't you put the desired label in the first place? $('#tabs').tabs('add', '#new', 'Label'); Other than that you could utilize the add callback: $('#tabs').tabs({ add: function(event, ui) { // add additional html to the tab $('span', ui.tab).html(...); } }); Or you

[jQuery] Re: Adding methods to Plugins

What I meant by the last question can probably be better explained by looking at this plugin code: http://www.gimiti.com/kltan/demo/jTree/jquery.jtree.1.0.js Take line 55 for example; $(container).find("li").bind("mouseover", getInitial); and then lines 134-140; var getInitial = function(e

[jQuery] Re: Adding methods to Plugins

> Many thanks for your reply, although I'm totally confused now ... I was just giving an example of using type-checking on the options argument. The following is a real snippet from the ajaxSubmit fn of the form plugin: if (typeof options == 'function') options = { success: options

[jQuery] Re: Adding methods to Plugins

Mike, Many thanks for your reply, although I'm totally confused now ... If I understand correctly; - options is checked for being a string (method) or a function (set of options) - If it's a string (and using 'a', 'b' or 'c' from my previous example) then execute the relevant code depend

[jQuery] Re: Adding methods to Plugins

> Well, that sort of works, although I need to be able to pass (and   > within the plugin provide default) options - I can do either but not   > both so I'm a bit stumped: Oh, I see what you mean now. Try something like this: $.fn.myplugin = function(options) { var defaults = { width: 300

[jQuery] Re: Adding methods to Plugins

Hi Mike, Well, that sort of works, although I need to be able to pass (and within the plugin provide default) options - I can do either but not both so I'm a bit stumped: eg, Method only: (function($){ $.fn.myplugin = function(option) { this.each(function() {

[jQuery] Re: Adding methods to Plugins

> Which disables the draggable functionality - this is essentially what   > I'm after. > > ie, > >         $('.selector').myplugin('somemethod'); > > Can anyone please advise/point me in the right direction of how to do   > this? Something like this maybe: $.fn.myplugin = function(option) {

[jQuery] Re: Adding an LI element to an OL

Date: 02/10/2009 04:24 PM Subject:[jQuery] Re: Adding an LI element to an OL Hi Michael, Thanks for replying. The sort won't need to be done very often at all s

[jQuery] Re: Adding an LI element to an OL

Hi Michael, Thanks for replying. The sort won't need to be done very often at all so I imagine that your solution would be ideal. Having a bit of trouble getting it to work though: $("#group_add").livequery('submit',function() { var group_name = $(this).children("#group_

[jQuery] Re: Adding an LI element to an OL

How often are you going to be doing this sort? You could just say that when you add something to the list, pull them all out and put them into an array, sort the array and then put it back out cheers Michael Lawson Content Tools Developer, Global Solutions, ibm.com Phone: 1-919-517-1568 Tieline

[jQuery] Re: Adding many elements to a element

Using the add function for appending option tags onto elements might help. var i = 0, select = $("select"), opt = $(''); for (; i < 1000; i++){ var o = opt.clone(); try { select.add(o, null); // standards compliant; doesn't work in IE } catch(ex) { elSel.add(o); // IE only } }

[jQuery] Re: Adding many elements to a element

Take a look at this: http://www.texotela.co.uk/code/jquery/select/ - Original Message - From: "roosteronacid" To: "jQuery (English)" Sent: Friday, January 23, 2009 9:44:27 AM GMT -05:00 US/Canada Eastern Subject: [jQuery] Adding many elements to a element Consider the following:

[jQuery] Re: adding a class to an object if the next object has the same attribute value.

Nice Works perfectly. Exactly what i need. Never considered the function each for this purpose!. On Jan 7, 5:07 pm, Ricardo Tomasi wrote: > In this line: > > $(".row > div").next("[Type="+$(this).attr("Type")+"]") > > 'this' is refering to the 'window' object or some other context, not > the ele

[jQuery] Re: adding a class to an object if the next object has the same attribute value.

In this line: $(".row > div").next("[Type="+$(this).attr("Type")+"]") 'this' is refering to the 'window' object or some other context, not the element you just selected. $('.row > div').each(function(){ //inside each 'this' is the current element var $this = $(this), next = $this.next();

[jQuery] Re: Adding to a group of Radio buttons

Hi Carrajo, W3C HTML specs says: associate a label with a form control. There are two standards ways to makup the label element - explicitly and implicity. See: http://www.w3.org/TR/REC-html40/interact/forms.html#edef-LABEL So, lets rewrite your markup using label implicity: Honda Toyota

[jQuery] Re: Adding scope support to .bind()

+1 I like that, we can use it in many instances in jQuery UI. On 25 Dez., 21:08, "Eduardo Lundgren" wrote: > The isFunction is faster now but still has more coast that when you don't > need to call it. > > We should keep the handler as the last parameter to fit with the jQuery API, > the change

[jQuery] Re: Adding scope support to .bind()

The isFunction is faster now but still has more coast that when you don't need to call it. We should keep the handler as the last parameter to fit with the jQuery API, the change is compatible with it. $('div').bind('click', {data: true}, scope, *scope.internalHandler*); Scoping events is a go

[jQuery] Re: Adding scope support to .bind()

True, but the new isFunction is a couple of times faster than the old one, though it's still many times faster to directly call Object.prototype.toString, which is far below 0.001ms. But as the callback function is the last parameter everywhere in jQuery it might be confusing to change this patter

[jQuery] Re: Adding scope support to .bind()

Note that isFunction is much faster now. It has been improved 3 times between 1.2.6 and 1.3b. On Thu, Dec 25, 2008 at 4:06 PM, Eduardo Lundgren wrote: > Hi Balazs, > > Thanks for give us your opinion. > > When you use $.isFunction(data) on the bind method it is very expensive > when you have a l

[jQuery] Re: Adding scope support to .bind()

Hi Balazs, Thanks for give us your opinion. When you use $.isFunction(data) on the bind method it is very expensive when you have a lot of iterations. Diff the file I attached with the original file (rev. 5996) I made only a small change on the bind() method, and it's compatible with data and wi

[jQuery] Re: Adding scope support to .bind()

Hi, I think this would be really useful! I've also modified jQuery to do this a while ago (1.2.6) but with the new scope being the last argument, so it works without the data object as well: jQuery.fn.bind=function( type, data, fn, bind ) { return type == "unload" ? this.one(type,

[jQuery] Re: Adding carousel to gallery help please

how can i add jquery cycle to this?? http://malsup.com/jquery/cycle/download.html http://illusionz.x24hr.com/?q=content/welcome#undefined http://devkick.com/lab/galleria/ jQuery(function($) { $('ul.gallery').galleria(); }); On Dec 18, 1:55 am, expat101 wrote: > Can someone help me wit

[jQuery] Re: Adding carousel to gallery help please

if i jump by clicking the thumb to the 6th image, i can then loop the rest On Dec 18, 1:55 am, expat101 wrote: > Can someone help me with my gallery please > > why does it stop after the 5th image? all i get is a black/blank > container? > > http://illusionz.x24hr.com/?q=content/welcome > > and

[jQuery] Re: Adding IMG attributes

The best way (IMO) to know if they're working is to view this site in Firefox with the Web Developers Toolbar. Under the View Source button on the toolbar is an option for "view generated source". This will show you the results of the page after any JavaScript has been executed. It'll display new

[jQuery] Re: Adding IMG attributes

Not exactly. The $(document).ready function fires when the DOM has been fully built, so not all the images will be loaded at that time. You could bind to the images load method as well. function fixDimensions() { var img = $(this); img.attr('width',img.width()); img.attr('height',img.h

[jQuery] Re: adding different class for only 1 error element?

Thank you for your reply. Your solution worked fine... I could add a different class to one only one error. A further question: Is it possible to wrap only 2 of the errors with an extra container? Is this possible with 'errorLabelContainer', or is that globally set ?! On 23 Nov., 22:24, Dan

[jQuery] Re: adding different class for only 1 error element?

Hi AxIF, you can use the errorPlacement: errorPlacement: function(error, element) { if(element.attr("id") == 'cname'){ // match your element's id error.addClass("invalid"); // add invalid class error.appendTo(element.parent()); // this line

[jQuery] Re: Adding a variable within a function name?

Thanks for pointing these few things out. I will get back there any make a few fixed. The editor_color.getHTML() is to get the content of the wysiwyg editor we use. Thanks! On Oct 29, 3:12 pm, Sam H <[EMAIL PROTECTED]> wrote: > On Oct 29, 4:57 pm, Nic Hubbard <[EMAIL PROTECTED]> wrote: > > > I

[jQuery] Re: Adding a variable within a function name?

On Oct 29, 4:57 pm, Nic Hubbard <[EMAIL PROTECTED]> wrote: > I am using the jquery each() function to find the id of text areas on > my page.  Then I need to add that id next to another function, but I > am getting syntax errors: > > $('textarea').each(function() { >         var textId = $(this).a

[jQuery] Re: Adding a double click event to a form element

You can do this- Set the field to readOnly by setting value of readOnly=true Then, bind action of $("#field").dbclick(function(){ set readOnly to false }); and then change it. See if your purpose is met.

[jQuery] Re: Adding select option values to hidden field

Hey Jamie... I'm using this one http://docs.jquery.com/Ajax/serializeArray It's working for me... On Aug 8, 7:06 am, Jamie Pittock <[EMAIL PROTECTED]> wrote: > Anyone able to offer any ideas? > > On Aug 7, 3:25 pm, Jamie Pittock <[EMAIL PROTECTED]> wrote: > > > Sorry, the value would be a comm

[jQuery] Re: Adding class to a parent element- traversion help?

How can I unsubscribe it? Steve

[jQuery] Re: Adding class to a parent element- traversion help?

Grr, well that didn't work. But I understand the basic premise of it, so thank you. -v On Sep 30, 9:55 pm, ricardobeat <[EMAIL PROTECTED]> wrote: > Try an ugly filter function: > > $(".bc-wrapper").filter(function(){ >     return !/^\s+$/.test(this.textContent); // "\s" is a shorthand for > whit

[jQuery] Re: Adding class to a parent element- traversion help?

Try an ugly filter function: $(".bc-wrapper").filter(function(){ return !/^\s+$/.test(this.textContent); // "\s" is a shorthand for whitespace/line breaks }).parent().addClass("none"); This will exclude from your selector all elements that have only whitespace in it. Be weary that regexes a

[jQuery] Re: Adding class to a parent element- traversion help?

@Michael Geary -- Thanks, now I get it. But the code is being output by a CMS, which has some whitespace that is output. So then truncate the whitespace? @FrenchilNLA -- It seemed to make sense, but this didn't work as long as I had that extra space. Once I took out the whitespace that Michael Gea

[jQuery] Re: Adding class to a parent element- traversion help?

your problem is coming from (this). just try : $(".bc-wrapper:empty").parent().addClass("none"); On Sep 30, 2:09 pm, Vinoj <[EMAIL PROTECTED]> wrote: > I've got the following as my jquery code: > >         $(document).ready(function() { >         $(".bc-wrapper:empty").(this).parent().addClass(

[jQuery] Re: Adding class to a parent element- traversion help?

Your div.bc-wrapper isn't empty. It has a text node in it because of the whitespace. Open Firebug on any page that uses jQuery and switch it to the multiline console (orange up arrow at the bottom right). Then paste this code in, hit Ctrl+Enter, and observe the results: $a = $('' ); $b =

[jQuery] Re: Adding "Arrows" to a DropDownMenu based on Lists

oh, I forgot to mention that IDs should be unique, you are using the same ID for many elements - use classes instead. On Sep 22, 3:39 pm, ricardobeat <[EMAIL PROTECTED]> wrote: > docs.jquery.com always helps. The has() function does what you want: > > $("#nav > li").has("ul").find("a.navlinkpar

[jQuery] Re: Adding "Arrows" to a DropDownMenu based on Lists

docs.jquery.com always helps. The has() function does what you want: $("#nav > li").has("ul").find("a.navlinkparent").css({ "background-image": "url(/img/nav_arrow_down.gif)", "background-repeat": "no-repeat", "background-position": "right center" }); $("#nav > ul > li").has("ul").f

[jQuery] Re: Adding a new row

Brian's solution should work fine, except that clicking on the new row's button won't create another new row, because the event isn't being cloned along with the element. To clone events as well, use .clone(true) instead of .clone(). Also, if you're dealing with 100 or more rows, you might

  1   2   3   >