[jQuery] Re: Add a second trigger in this function

2010-01-07 Thread Jordan
Unfortunately that didn't work either. Is there another approach that I should be taking on this? On Jan 6, 3:20 pm, Johan Borestad wrote: > I think you just forgot the last brackets on your hover method: > > $("div.tvbutton").hover(function () { >       $("div.tv").trigger('hover'); > > })  <---

[jQuery] Re: Add a second trigger in this function

2010-01-06 Thread Johan Borestad
I think you just forgot the last brackets on your hover method: $("div.tvbutton").hover(function () { $("div.tv").trigger('hover'); }) <--- Forgotten This could be optimized a little better by using id's, or at last saving a a reference to the "div.tv", so that you don't have to make searc

[jQuery] Re: Add a second trigger in this function

2010-01-06 Thread Jordan
Thanks for the insight Johan! When I implemented that though, it just added the hover cross fade to the other div as well. I am looking for a way to make the 2nd div JUST trigger the first. I was looking at the page you linked to and I am messing around with something like the following... although

[jQuery] Re: Add a second trigger in this function

2010-01-05 Thread Johan Borestad
Hi! There are a number of nice implementations you could use for this. Example the jQuery trigger. http://docs.jquery.com/Events/trigger But for now, the simpliest solution is just to add another selector like this $('div.example, div.tv').hover( . / Johan On Jan 5, 8:33 pm, Jordan wrote: >

[jQuery] Re: .add()

2009-12-23 Thread Scott
I don't know how to communicate very well, I meant I don't know why I'd think .add() would work any different than .filter() does. On Dec 23, 1:38 pm, MorningZ wrote: > "I don't know why I assumed it would work this way when .filter() is > the same" > > filter doesn't work the same either... > >

[jQuery] Re: .add()

2009-12-23 Thread MorningZ
"I don't know why I assumed it would work this way when .filter() is the same" filter doesn't work the same either... as http://jsbin.com/imifa/edit chaining sticks to the current processed line, it doesn't remember for later processing unless it's told to :-) On Dec 23, 2:07 pm, Scott wrote

Re: [jQuery] Re: .add()

2009-12-23 Thread Charlie Griefer
Sorry, misunderstood. I wasn't clear on what you were trying to do, but saw the "Maybe I'm not understanding the point of .add()", so was trying to clarify that. Glad MorningZ got you sorted :) On Wed, Dec 23, 2009 at 10:59 AM, Scott wrote: > Uh, that's not what I'm asking at all. > > In the d

[jQuery] Re: .add()

2009-12-23 Thread Scott
> $obj1 = $obj1.add($obj2); Ok, this is what I was missing. I don't know why I assumed it would work this way when .filter() is the same.

[jQuery] Re: .add()

2009-12-23 Thread Scott
Uh, that's not what I'm asking at all. In the documentation example you're passing .add() the "p" selector which is a string. I want the end result to be the same except instead of passing a selector string like "p" I want to pass an existing jquery object. It doesn't seem to work this way and the

[jQuery] Re: .add()

2009-12-23 Thread MorningZ
I think you are trying to merge the jQuery array of items found by ".stuff" and ".morestuff" var $obj1 = $(".stuff"); var $obj2 = $(".morestuff"); $obj1.add($obj2); alert($obj1.length); the problem is the line $obj1.add($obj2); doesn't assign the value back to variable "$obj1", so the next line

[jQuery] Re: Add class selected to a hyperlink in navibar! Help me.

2009-12-21 Thread Šime Vidas
HTML code: Page 1 Page 2 Page 2 C# code: protected void Page_Load(object sender, EventArgs e) { string navID = this.Page.ToString().Substring(4, this.Page.ToString ().Substring(4).Length - 5)

[jQuery] Re: Add class selected to a hyperlink in navibar! Help me.

2009-12-20 Thread Nguyen Phu Cuong
On Dec 20, 2:27 pm, Šime Vidas wrote: > You should add that class on the server-side everytime you click > on a link, a new page is loaded, so the current page is overwritten > together with your jQuery code... Hi, what's solution for server-side navbar?

[jQuery] Re: Add class selected to a hyperlink in navibar! Help me.

2009-12-20 Thread Šime Vidas
You should add that class on the server-side everytime you click on a link, a new page is loaded, so the current page is overwritten together with your jQuery code...

[jQuery] Re: add element after page has loaded

2009-11-26 Thread edencane
Hi. Thanks. That was what I needed. Kr. Luke. On Nov 26, 6:04 pm, Rick van Hoeij wrote: > Hey, > > Best way to make sure that the form has been loaded is to use the load > callback function: > > $('#formGen1').load('formGen1.jsp', function(){ >    //Callback function: Form has been loaded >    

[jQuery] Re: add element after page has loaded

2009-11-26 Thread Rick van Hoeij
Hey, Best way to make sure that the form has been loaded is to use the load callback function: $('#formGen1').load('formGen1.jsp', function(){ //Callback function: Form has been loaded //Code implementation }); I usualy hide the form that I'm editing until it is ready to be shown. Simple h

[jQuery] Re: Add value to Link. How can I do this?

2009-10-16 Thread Jason
$(".Download").each(function(){ $(this).attr('onClick', "javascript: pageTracker._trackPageview('/ downloads/map');"); }); On Oct 16, 5:51 pm, shapper wrote: > Hello, > > I have the following anchor: > http://www.example.com/files/map.pdf"; onClick="javascript: > pageTracker._trackPageview('

[jQuery] Re: Add value to Link. How can I do this?

2009-10-16 Thread James
$(".Download").click(function() { pageTracker._trackPageview('/downloads/map'); }); On Oct 16, 11:51 am, shapper wrote: > Hello, > > I have the following anchor: > http://www.example.com/files/map.pdf"; onClick="javascript: > pageTracker._trackPageview('/downloads/map'); "> > > How can I add

[jQuery] Re: Add content

2009-09-24 Thread Charlie Griefer
On Thu, Sep 24, 2009 at 2:03 PM, a1anm wrote: > > Hi, > > I have an unordered list and I would like to use Jquery to add some > 's to it. > > How do I do this? > > Thanks! http://docs.jquery.com/Manipulation/append -- Charlie Griefer http://charlie.griefer.com/ I have failed as much as I hav

[jQuery] Re: add value from listbox to textbox

2009-08-21 Thread Dhruva Sagar
In fact you have to re-check the *id* of both the 'select' box and the 'text-box'.It should work if these two are correct. Thanks & Regards, Dhruva Sagar. Samuel Goldwyn - "I'm willing to admit that I may not always be right, but I

[jQuery] Re: add value from listbox to textbox

2009-08-21 Thread Dhruva Sagar
Well, I re-read your HTML, and I see that the 'id' of the text box you have mentioned is 'edit-field-sourc-0-value', please just make sure the spellings of the 'id' of the text field are right, exactly as you have in your HTML Thanks & Regards, Dhruva Sagar. Jonathan Swift

[jQuery] Re: add value from listbox to textbox

2009-08-21 Thread Tan
yes, i have to change code to: http://www.w3.org/ TR/html4/strict.dtd"> test http://jqueryjs.googlecode.com/ files/jquery-1.3.2.min.js"> $(document).ready(function(){ $('#edit-default-source').change(function() { $('#edit-field-soure-0-value').text($(this).val()); }); }); hongki

[jQuery] Re: add value from listbox to textbox

2009-08-21 Thread Dhruva Sagar
For the listbox you should simply use the function *change *i'll give an example : $('#edit-default-source').change(function() { $('#edit-field-soure-0-value').text($(this).val()); }); This should do what you want (if I correctly understood it), once you select an option in the select drop

[jQuery] Re: Add post to "My favorites" page

2009-08-18 Thread Meroe
So do you just want to load a form when one of those links is clicked? -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Vladimir Sent: Tuesday, August 18, 2009 10:47 AM To: jQuery (English) Subject: [jQuery] Add post to "My favorites" p

[jQuery] Re: Add extra content to the title attribute

2009-08-18 Thread Glödu
This does not work when there are multiple title-attribute to add, there it is only from the first title element transferred. On 11 Aug., 07:18, Paul Collins wrote: > Thanks for your help guys, that worked a treat. > You're right Liam, that was my bad, there was no "add" there, I meant > "attr",

[jQuery] Re: Add extra content to the title attribute

2009-08-18 Thread Glödu
This does not work when there are multiple title-attribute to add extra content, the original title from the first title element stay in the other tiltes. On 11 Aug., 07:18, Paul Collins wrote: > Thanks for your help guys, that worked a treat. > You're right Liam, that was my bad, there was no "

[jQuery] Re: Add element after closing tag of another.

2009-08-14 Thread James
For your first question, you can use wrap(). http://docs.jquery.com/Manipulation/wrap For your second question, if you didn't know, and ID must begin with a letter, not a number. With that in mind, you can do something like: var counter = 1; $("span").each(function() { this.id = 'id_'+counte

[jQuery] Re: Add / Remove Class help

2009-08-13 Thread bhu Boue vidya
you could also use $("bookmarked, .bookmarked.not") esp. if the ".not" class is used elsewhere in the html On Aug 13, 7:51 pm, "Richard D. Worth" wrote: > You selector has an error: > $(".bookmarked,.bookmarked not") > > That will match any elements with a class of 'bookmarked' as well as a

[jQuery] Re: Add / Remove Class help

2009-08-13 Thread Richard D. Worth
You selector has an error: $(".bookmarked,.bookmarked not") That will match any elements with a class of 'bookmarked' as well as any elements of type 'not' descendant of elements with a class of bookmarked. It seems you've copied the value from the class attribute of your element. Problem is, the

[jQuery] Re: add class and remove class from perspective element

2009-08-12 Thread Liam Potter
$(function(){ $("img.images").click(function(){ $("img.images").css({border:'none'}); $(this).css({border:'1px solid #f00'}); }); }); runrunforest wrote: Hi, I have 3 image, in turn called img1, img2, img3. I need a code snippet that will

[jQuery] Re: Add extra content to the title attribute

2009-08-11 Thread Paul Collins
Thanks for your help guys, that worked a treat. You're right Liam, that was my bad, there was no "add" there, I meant "attr", which was the wrong code anyways... Cheers again Paul 2009/8/11 anurag pal > Hi, > > Use prepend method. > > Regards, > Anurag Pal > > > On Tue, Aug 11, 2009 at 3:15 PM

[jQuery] Re: Add extra content to the title attribute

2009-08-11 Thread anurag pal
Hi, Use prepend method. Regards, Anurag Pal On Tue, Aug 11, 2009 at 3:15 PM, Paul Collins wrote: > Hi all, > This is hopefully simple. I have a bunch of links with titles, like > TITLE="Facebook" and so on. I am adding JQuery to make the links open in a > new window and would like to add some t

[jQuery] Re: Add extra content to the title attribute

2009-08-11 Thread Peter Edwards
try this: $("a.newWindow").attr("title", $("a.newWindow").attr("title")+" - This link will open in a new window"); On Tue, Aug 11, 2009 at 10:45 AM, Paul Collins wrote: > Hi all, > This is hopefully simple. I have a bunch of links with titles, like > TITLE="Facebook" and so on. I am adding JQuer

[jQuery] Re: Add extra content to the title attribute

2009-08-11 Thread Liam Byrne
Paul Collins wrote: > I'm using the "add" JQuery command, > $("a.newWindow").attr("title", " - This link will open in a new window"); I can't see any "add" there ? The proper code would be $("a.newWindow").attr("title",$(this).attr("title")+" - This link will open in a new window"); L Pau

[jQuery] Re: Add extra content to the title attribute

2009-08-11 Thread Liam Potter
something like this var origTitle = $("a.newWindow").attr("title"); $("a.newWindow").attr("title", origTitle+" - This link will open in a new window"); Paul Collins wrote: Hi all, This is hopefully simple. I have a bunch of links with titles, like TITLE="Facebook" and so on. I am adding JQ

[jQuery] Re: Add icons to your links automatically

2009-07-15 Thread Charlie Griefer
On Wed, Jul 15, 2009 at 1:47 PM, Charlie Griefer wrote: > On Wed, Jul 15, 2009 at 1:41 PM, Jacques Choquette - > WhistlerGraphicDesign.com wrote: > >> >> HI there I am using the working with the following script >> >> Add icons to your links automatically using jQuery & CSS >> >> http://cool-java

[jQuery] Re: Add icons to your links automatically

2009-07-15 Thread Charlie Griefer
On Wed, Jul 15, 2009 at 1:41 PM, Jacques Choquette - WhistlerGraphicDesign.com wrote: > > HI there I am using the working with the following script > > Add icons to your links automatically using jQuery & CSS > > http://cool-javascripts.com/jquery/add-icons-to-your-links-automatically-using-jquer

[jQuery] Re: Add function (transverse)

2009-07-13 Thread mkmanning
>Is there another way to accomplish this? $(".post").hover(function () { $(this).find('.category,.comments').show(); }, function () { $(this).find('.category,.comments').hide(); }); On Jul 13, 9:50 am, aakoch wrote: > I find it frustrating that the transversing add function (

[jQuery] Re: Add / Remove Element dynamically

2009-07-02 Thread bharani kumar
ok ok ..sure On Thu, Jul 2, 2009 at 6:48 PM, Charlie wrote: > > How is anyone supposed to understand what it is you are wanting to do with > a 5 word question. Try going to jquery.com and type in C-O-U-N-T in > search box. Constantly asking for help *several times a week*, and > expecting other

[jQuery] Re: Add / Remove Element dynamically

2009-07-02 Thread Charlie
How is anyone supposed to understand what it is you are wanting to do with a 5 word question. Try going to jquery.com and type in  C-O-U-N-T in search box. Constantly asking for help several times a week, and expecting others to spend far more time creating their replies than you put into you

[jQuery] Re: Add / Remove Element dynamically

2009-07-02 Thread bharani kumar
what about that count calculation , Thanks On Thu, Jul 2, 2009 at 4:36 PM, Charlie wrote: > remove() > append() > > > bharani kumar wrote: > > Hi all, > > How i Add/Remove element dynamically using jquery , > > i want to Add/remove not more then 8 element (ie Textbox) > > Thanks > > bharanikum

[jQuery] Re: Add / Remove Element dynamically

2009-07-02 Thread Charlie
remove() append() bharani kumar wrote: Hi all, How i Add/Remove element dynamically using jquery , i want to Add/remove not more then 8 element (ie Textbox) Thanks bharanikumar

[jQuery] Re: Add class where input differs

2009-06-29 Thread James
You're just going to have to add some kind of onkeyup, onchange, etc. type of event to trigger your own "differ" function. Then your differ function will do the checking. This is done depending on where and how your "history" is being stored (e.g. array or JSON). On Jun 29, 9:09 am, Richard Walsh

[jQuery] Re: Add items to list, is this a proper approach?

2009-06-19 Thread maubau
On 19 Juni, 17:23, Charlie wrote: > "according to what's in this list." > no way to see from here what's in your list, what you want to look for or > what you want to do once you find( or don't find) what you are looking for I'll try to explain it a bit better. On the input field, as you

[jQuery] Re: Add items to list, is this a proper approach?

2009-06-19 Thread Charlie
"according to what's in this list." no way to see from here what's in your list, what you want to look for or what you want to do once you find( or don't find) what you are looking for maubau wrote: I'm trying to create a list, to which you can: 1. add and remove items. 2. accordin

[jQuery] Re: Add Class to all form elements

2009-06-18 Thread mkmanning
The :input selector in ':input,:radio,:checkbox' selects all inputs, selects, textarea's and buttons, the last two selectors are redundant. The selector in my last example only selects text inputs, radios and checkboxes, so it will exclude the submit. Swap it for Gustavo's: $('form').find(':text,

[jQuery] Re: Add Class to all form elements

2009-06-17 Thread Loony2nz
The easiest implementation was Gustavo's. however, how do i exlcude the submit button? I guess i can go back and do a single call to remove the class after the fact. On Jun 17, 11:47 pm, Loony2nz wrote: > Hi all, > > Just for clarification, there is only one form on the page at any one > time.

[jQuery] Re: Add Class to all form elements

2009-06-17 Thread Loony2nz
Hi all, Just for clarification, there is only one form on the page at any one time. Thank you all for you thoughts. I'm going to try them tonite. On Jun 2, 9:40 am, mkmanning wrote: > "if you have inputs that are not within forms" > That should never happen if you're using valid markup ;) >

[jQuery] Re: Add magically?

2009-06-03 Thread Gustavo Salomé
$('#programs').before(''); 2009/6/4 Dave Maharaj :: WidePixels.com > Can jQuery add a div in a specific location? > > I currently have : > > > > > > Programs > >echo $program['name'] . ', '; > endfo

[jQuery] Re: Add magically?

2009-06-03 Thread Dave Maharaj :: WidePixels.com
Sweet! thanks man Dave _ From: Gustavo Salomé [mailto:gustavon...@gmail.com] Sent: June-04-09 1:58 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Add magically? $('#programs').before(''); 2009/6/4 Dave Maharaj :: WidePixels.com Can jQuery add

[jQuery] Re: Add Class to all form elements

2009-06-02 Thread mkmanning
"if you have inputs that are not within forms" That should never happen if you're using valid markup ;) Although the OP gave no indication there'd be other forms on the page, if you want to target a specific form just use the context: $(':text,:checkbox,:radio',$('SPECIFIC_FORM')).addClass ('YOU

[jQuery] Re: Add Class to all form elements

2009-06-02 Thread Gustavo Salomé
Try it: $('form').find(':input,:radio,:checkbox').addClass('class'); 2009/6/2 waseem sabjee > Yes but he only wants to add class to forms. myway is loop through all > forms. or all forms with a specific class. then for each form loop through > all inputs. this way is better only if you want cer

[jQuery] Re: Add Class to all form elements

2009-06-02 Thread waseem sabjee
Yes but he only wants to add class to forms. myway is loop through all forms. or all forms with a specific class. then for each form loop through all inputs. this way is better only if you want certain forms not to have the class name or if you have inputs that are not within forms. On Tue, Jun 2

[jQuery] Re: Add Class to all form elements

2009-06-01 Thread mkmanning
Or you could just do this: $(':input,:checkbox,:radio').addClass('YOUR_CLASSNAME'); On Jun 1, 10:24 am, waseem sabjee wrote: > > $(function() { > > var myforms = $("form"); > > myforms.each(function(i) { > > var myform = myforms.eq(i); > > var myfields = $("input", myform); > > myfields.each(

[jQuery] Re: Add Class to all form elements

2009-06-01 Thread waseem sabjee
$(function() { var myforms = $("form"); myforms.each(function(i) { var myform = myforms.eq(i); var myfields = $("input", myform); myfields.each(function(i) { var myfield = myfields.eq(i); myfield.addClass("myflied_"+i); }); }); }); On Mon, Jun 1, 2009 at 7:19 PM, Loony2nz wrote: > >

[jQuery] Re: add href to table row from link inside row

2009-04-19 Thread kevind
never mind - added line : window.location=href; to complete process thanks again On Apr 19, 4:35 pm, kevind wrote: > hi, > > your example code didn't work - is there some step i'm missing ? > > here's an example of one of the rows in my table > > >   >     USB Backupsetup USB > backup >   >

[jQuery] Re: add href to table row from link inside row

2009-04-19 Thread kevind
hi, your example code didn't work - is there some step i'm missing ? here's an example of one of the rows in my table USB Backupsetup USB backup 09-Sep-08 0809007

[jQuery] Re: add href to table row from link inside row

2009-04-19 Thread kevind
thanks - will try this - i meant grabbing the A link href and creating an on-click event for the row - didn't look back at another page where i built the onclick for the row by a different method this will definitely save me time :) On Apr 19, 3:45 pm, mkmanning wrote: > Just to clarify, your r

[jQuery] Re: add href to table row from link inside row

2009-04-19 Thread mkmanning
Just to clarify, your row can't have an href as that's not a valid attribute, but you can put a click handler on the row and have it access the contained anchor to get the href. This might get you started: $('tr.row').click(function(){ var href = $(this).find('a').attr('href'); }) Be aware th

[jQuery] Re: Add an "attribute"

2009-04-19 Thread David
Exactly! Thank you very much! On 19 avr, 17:52, Karl Swedberg wrote: > Sounds like you're looking for the .data() method. See information on   > the docs: > > http://docs.jquery.com/Core/data#namevalue > > --Karl > > > Karl Swedbergwww.englishrules.comwww.learningjquery.com > > On

[jQuery] Re: Add an "attribute"

2009-04-19 Thread Karl Swedberg
Sounds like you're looking for the .data() method. See information on the docs: http://docs.jquery.com/Core/data#namevalue --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Apr 19, 2009, at 4:06 AM, David wrote: Hello everybody, I have a little question

[jQuery] Re: Add option to combo

2009-03-18 Thread lucas
Thanks Paul!

[jQuery] Re: Add option to combo

2009-03-17 Thread Paul Mills
Hi, The prepend function just adds HTML at the beginning. You have to set the select yourself. Simplest way would be like this: $('select').prepend('Select ... '); or something like this: $('select').prepend('Select ... '); $('select option:first').attr("selected","selected"); Paul On Mar 17, 1

[jQuery] Re: Add option to combo

2009-03-17 Thread lucas
Thanks! but, prepend put the element at begining of the list in the combo, but it isn´t selected as the first option in the documentation i didn´t see nothing to put it as selected. Thanks again!

[jQuery] Re: Add option to combo

2009-03-16 Thread Stephen Sadowski
Hey there, how about using .prepend(), if all you want to do is insert it first? -S On Mon, 2009-03-16 at 08:25 -0700, Chizo wrote: > Hi people, how can i add a first option value to a combobox, > containing for example "Select..." > With append i can add the new value, but i don´t know how to

[jQuery] Re: Add option to combo

2009-03-16 Thread Paul Mills
Hi, Try using prepend to add at the beginning. See jQuery docs - http://docs.jquery.com/Manipulation/prepend Paul On Mar 16, 3:25 pm, Chizo wrote: > Hi people, how can i add a first option value to a combobox, > containing for example "Select..." > With append i can add the new value, but i do

[jQuery] Re: Add value to input

2009-03-12 Thread mkmanning
$(B).click(function(){ $(I)[0].value += $(S).val(); }); On Mar 12, 5:38 pm, shapper wrote: > Hello, > > In a form I have a select (S), a button (B) and an input (I) among > other form elements. > I would like to add the value of the select, when the button is > clicked, to the end of the

[jQuery] Re: add to

2009-03-12 Thread Elmar
You were right. The standard code works but not the jQuery one. It works fine in a standard operation but if it is called within an Event- Handler, it doesn´t whereas the standard DOM-Manipulation works just fine. Not sure where that leaves us but at least we have narrowed the issue down. Thanks

[jQuery] Re: add a 'class' to tag based on page file name

2009-03-11 Thread mkmanning
Why use a separate array? $('.design_html_nav li').each(function(){ var a = $(this).find('a').attr('href'); if(a[0].href===file){ a.addClass('selected'); } }); On Mar 11, 3:16 pm, vintagetwitch wrote: > Hi all, > > What I would like to do is add a 'select

[jQuery] Re: add to

2009-03-11 Thread mkmanning
Not sure if this might be related to your problem: http://groups.google.com/group/jquery-dev/browse_thread/thread/6d3de70e6f2c6ebe/908edb7729c03a3c?lnk=raot I'd suggest trying to add a LI to the UL using standard DOM methods: var li = document.createElement('li'); li.appendChild(document.createTe

[jQuery] Re: add to

2009-03-11 Thread Elmar
Sure. There is a small difficulty in that this code is supposed to run an iPhone/Webkit and some API´s don´t make sense in a standard web enviroment. But basically you can just strip all that exra bits and pieces and just run it in a browser. I should actually do this myself and see if it is an is

[jQuery] Re: add to

2009-03-10 Thread mkmanning
@Elmar, there's nothing wrong with your jQuery; there is with Joseph's: creating a closing LI won't work :( Could you show where in your script you're trying to append the LI? On Mar 10, 4:03 pm, Joseph Le Brech wrote: > $("").appendTo("#myList").html("Please show up"); > > the one you used tho

[jQuery] Re: add to

2009-03-10 Thread Joseph Le Brech
$("").appendTo("#myList").html("Please show up"); the one you used those should also work tho. > Date: Tue, 10 Mar 2009 14:18:57 -0700 > Subject: [jQuery] add to > From: elsch...@googlemail.com > To: jquery-en@googlegroups.com > > > Hi there, > I am probably trying the most basic example and

[jQuery] Re: add a child node using jQuery

2009-02-12 Thread Paul Mills
Hi Alain, I assume you want to wrap the node around the first table row. $('table tr:first').wrap(''); If that doesn't do it then post your html and where exactly you want to add Paul On Feb 11, 5:58 pm, Alain Roger wrote: > Hi, > > i have a tage and i would like to add a node using jQuer

[jQuery] Re: Add Checkboxes in a table.

2009-01-22 Thread Kean
Let me guess, you wanted to add a new row and it is almost identical to the row before it. This will probably work. $row = $('table tr:last-child').clone(); $row.appendTo('table'); On Jan 22, 7:42 am, Andy wrote: > I need to be able to dynamically add a new rows to a table and add > elements

[jQuery] Re: Add Checkboxes in a table.

2009-01-22 Thread ryan.joyce...@googlemail.com
maybe try .append-ing stuff to the table? $('table#my_table').append( stuff to append goes here ) On Jan 22, 3:42 pm, Andy wrote: > I need to be able to dynamically add a new rows to a table and add > elements such as check boxes, plain text and hyperlinks.  I cannot > find any examples of this

[jQuery] Re: Add a class to an accordion

2008-12-13 Thread paul
I made a mistake on : $(document).ready(function(){ $(".accordion .foo h3").eq(0).addClass("active"); $(".accordion .foo p").eq(0).show(); $(".accordion2 .foo h3").click(function(){ $(this).next("p").slideToggle("fast") .siblings("p:visi

[jQuery] Re: Add click() event to each() loop constructor

2008-12-10 Thread Brett Alton
That was too easy. Thank you for the quick response! $(document).ready(function() { $("a[id*='activate-']").each(function(i){ $(this).click(function(){ $('#toggle1-'+i).slideToggle('slow'); $('#toggle2-'+i).slideToggle('slow'

[jQuery] Re: Add click() event to each() loop constructor

2008-12-10 Thread Brian Cherne
If I understand your question properly, it is possible. Try something like this: $(document).ready(function() { $("a").each(function(i){ $(this).click(function(){ alert(i); }); }); }); Brian. On Wed, Dec 10, 2008 at 10:29 AM, Brett Alton <[EMAIL PROTECTED]>wrote: > > Sorry, I'm new to Google Gr

[jQuery] Re: add property name via a variable

2008-11-15 Thread Theodore Ni
Something like this would work: foo("bar"); function foo(prop) { window[prop] = 1; } Ted On Sat, Nov 15, 2008 at 1:24 PM, Johnnie Walker <[EMAIL PROTECTED]> wrote: > > Hi, > > Is there any way to add a property named via a variable to a > javascript object? > > this is what I would like t

[jQuery] Re: add property name via a variable

2008-11-15 Thread klkmva
Something like : -- function foo(x) { window[x] = 1; } foo('bar'); alert(window.bar); On 15 nov, 19:24, Johnnie Walker <[EMAIL PROTECTED]> wrote: > Hi, > > Is there any way to add a property named via a variable to a > javascript obj

[jQuery] Re: add a value to text field

2008-11-12 Thread Michael Geary
If you'd like a cleaner jQuery way to do this, it would be: $('#start_odo11').val( start_odo ); For more information, see: http://docs.jquery.com/Attributes/val You'll find this same pattern in a few places in jQuery. For example, the .html() method works the same way: var myhtml = $(...).htm

[jQuery] Re: add a value to text field

2008-11-12 Thread GrootBaas
OK, no worries. I used this ... document.getElementById('start_odo11').value = start_odo; Thanks anyway. On Nov 13, 10:36 am, GrootBaas <[EMAIL PROTECTED]> wrote: > Hi all, > > This is a very junior question that I need help with please ... > > I use > > var start_odo = $("#end_odo"+counter).va

[jQuery] Re: add child to very simple question!

2008-11-07 Thread Rik Lomas
You can do: $('#test').after('Hello'); or: $('#test').parent().append('Hello'); Rik 2008/11/7 jfk <[EMAIL PROTECTED]>: > > Ok, this probably just needs someone to slap me towards a tutorial, > however I couldn't seem to find one! > > I'm trying to use jquery to add a child to part of an unor

[jQuery] Re: Add callback to plugin?

2008-11-06 Thread Mike Nichols
Why not take advantage of jquery's event mechanism and do an event based api, like: $("#sel").testStatus(opt).bind("statusupdated.testStatus",function() { //dostuff }); then in your plugin: if (question) { $.ajax({ type: 'POST', url: itemHref + defaults.status

[jQuery] Re: Add callback to plugin?

2008-11-06 Thread Hector Virgen
I would add it as an option and set its default value to an empty function: var defaults = { status: '?action=live', onComplete: function() {} } That way you could safely call onComplete when ready and it will either do nothing or call the user-supplied function. -Hector On Thu, Nov 6,

[jQuery] Re: Add label

2008-10-27 Thread Karl Swedberg
Try this: var $msg = $('#Message'); if (!$msg.val()) { $msg.after('class="Welcome">Welcome Text'); } --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Oct 27, 2008, at 5:58 PM, shapper wrote: Hello, I need to check if an input, #Message, value is empty

[jQuery] Re: Add class (highlight) to link if other element has given attribute

2008-10-25 Thread jlgoolsbee
Yeah; it's a different approach than what I was thinking, but from the looks of it this is probably the right way to go. I'm new to jQuery, and my javascript skills are a little rusty, but let me give this approach a try. Thanks! On Oct 25, 3:23 pm, ricardobeat <[EMAIL PROTECTED]> wrote: > So

[jQuery] Re: Add class (highlight) to link if other element has given attribute

2008-10-25 Thread ricardobeat
Something like this: http://jsbin.com/evoge/ ? - ricardo On Oct 25, 4:58 pm, jlgoolsbee <[EMAIL PROTECTED]> wrote: > I guess I should mention; when I say that I need to highlight the > links on-load, I mean that I need to highlight the link of the > corresponding iframe.  That might have been im

[jQuery] Re: Add class (highlight) to link if other element has given attribute

2008-10-25 Thread jlgoolsbee
I guess I should mention; when I say that I need to highlight the links on-load, I mean that I need to highlight the link of the corresponding iframe. That might have been implied, but clearing it up just in case.

[jQuery] Re: add/remove and recalculate index

2008-09-30 Thread claudes
variable html is this php file: Chapter $x Remove Chapter Chapter Title: Chapter Web Description: Chapter Full Description: Thumbnail URL: (Anamorphic ratio 2.35:1 ) / Thumbnail 142px x 60px Chapter Start Time: H:M:S.SSS Chapter End Time: H:M:S.SSS EOS; ?> MorningZ

[jQuery] Re: add/remove and recalculate index

2008-09-30 Thread MorningZ
its tough to diagnose without knowing what your variable "html" returned by the $.ajax call is but working up an example trying to simulate it, this works as expected items stay in order of adding plus the items adjust their indexes automatically http://paste.pocoo.org/show/86671/ On S

[jQuery] Re: add a new class for middle element

2008-09-29 Thread George PAL
Thank you for the solution. I like it, but I would like to have always the middle occurence. So if there are 10, and we first display 1,2, 3 (i need #2 selected) , then if you click next to have 2,3,4 - but #3 selected as so on - to have always the one that's in the middle (depindeing on the naviga

[jQuery] Re: add a new class for middle element

2008-09-26 Thread Mauricio (Maujor) Samy Silva
HTML: First element Second element Third element jQuery: $('.some-class p:eq(1)' ).css('color', 'red'); -- jQuery pseudo-class :eq(i) targets the i-nd occurence of the obeject selected. Counts start on zero (JavaScript based)

[jQuery] Re: Add Class to matched href location Click to flag this post

2008-09-24 Thread jrutter
I figured it out with the help of a good friend - jason-palmer.com var path = location.pathname; $("a[href='" + path + "']").parents("li").each(function() { $(this).addClass("selected"); }); On Sep 24, 7:52 pm, jrutter <[EMAIL PROTECTED]> wrote: > Im having trouble getting this to work,

[jQuery] Re: Add Class to matched href location Click to flag this post

2008-09-24 Thread jrutter
I figured it out with the help of a good friend - jason-palmer.com var path = location.pathname; $("a[href='" + path + "']").parents("li").each(function() { $(this).addClass("selected"); }); On Sep 24, 7:52 pm, jrutter <[EMAIL PROTECTED]> wrote: > Im having trouble getting this to work,

[jQuery] Re: add regex in $('.class')

2008-09-24 Thread jeremyBass
Nevermind... got it.. but I would welcome any help on improving this thanks for the help $('[class^=Round_gen]').filter(function(){ return /Round_gen[0-9]+/.test( $(this).attr('class') ); }).each(function(){ $(this).each(function() {var $this = $(this); var params = $(this

[jQuery] Re: add regex in $('.class')

2008-09-24 Thread jeremyBass
Ok little by little this does output the alerts but I can't seem to target the embed... function doSomething() { var NEWheight = self.childNodes[1].offsetHeight; var NEWwidth = self.childNodes[1].offsetWidth; alert ("NEWwidth"+NEWwidth); alert ("NEWheight"+NEWheight); $(thi

[jQuery] Re: add regex in $('.class')

2008-09-24 Thread jeremyBass
So tring to work this out... I did this function doSomething() { var self = this; var NEWheight = $("self").contents("embed").offsetHeight; var NEWwidth = $("self").contents("embed").offsetWidth; alert ("NEWwidt"+NEWwidth); alert ("NEWheight"+NEWheight); $(this).contents(

[jQuery] Re: add regex in $('.class')

2008-09-24 Thread jeremyBass
Here is another go... the problem is that It's not erroring out at all... I need to figure this out... I just don't have the time under my belt to do this right... I'v only beed working with javascript for less then a year, and jquery for like 3 months ~may-be... any help would be great... thank y

[jQuery] Re: add regex in $('.class')

2008-09-24 Thread jeremyBass
Hello... here is another thry to work around this issue... any ideas on this... $(this).contents("[childNodes=0]").not(".readME").addClass("sizeME"); var $size = $(".sizeME"); var $read = $(".readME"); function doSomething() { var NEWheight = $read.offsetHeight; var NEWwidth = $read.offsetW

  1   2   >