[jQuery] Re: Assinging the A:visted tag a class

2008-05-15 Thread motob
that the class remains active for the link till another link is clicked. The method you posted assigns the class only when clicked and does not persist On May 14, 10:18 pm, motob [EMAIL PROTECTED] wrote: You'll need to add a click listener to each link, then when the user clicks, add

[jQuery] Re: Defining regular expressions with # selector ??

2008-05-15 Thread motob
I think this would be possible, but you would need to write a custom selector expression. You can refer to this link: http://www.malsup.com/jquery/expr/. You might be able to get away with something like this. jQuery.extend(jQuery.expr[':'], { startsWithDiv1: function(a){ //a = DOM

[jQuery] Re: Defining regular expressions with # selector ??

2008-05-15 Thread motob
CORRECTION TO THE ABOVE CODE. the if statement needs to read: if($(a).attr('id').indexOf('div1') != -1) On May 15, 10:41 am, motob [EMAIL PROTECTED] wrote: I think this would be possible, but you would need to write a custom selector expression. You can refer to this link:http

[jQuery] Re: Assinging the A:visted tag a class

2008-05-14 Thread motob
You'll need to add a click listener to each link, then when the user clicks, add the class 'current'. When the user clicks another link you can remove the current class from all links inside the div before assigning the 'current' class back to the clicked link. You can do something like this.

[jQuery] Re: jquery doesn't work after changing innerhtml

2008-05-06 Thread motob
When you use innerHtml it completely destroys the anchor tag and replaces it with another one. Not sure if jQuery does this or the browser, but when you destroy an element, all event listeners are destroyed too. So you'll either have to re-initialize the click listener when you use innerHtml, or

[jQuery] Re: event data ?

2008-05-06 Thread motob
$('.mybutton').click(function(){ alert($(this).attr(id)); //get the id $(this).attr(disabled, disabled); //disable the clicked button }); On May 6, 3:33 am, Adwin Wijaya [EMAIL PROTECTED] wrote: Hi I got a problem ... I have more than 1 buttons and each buttons has unique name. I

[jQuery] Re: extending objects with jquery

2008-05-06 Thread motob
jQuery isn't really a javascript framework, so any extending and inheritance issues need to be dealt with using JavaScript's prototype chain. So you could do something like this: function View(){ ... } function DataGrid(){ ... } DataGrid.prototype = new View(); //here is your inheritance

[jQuery] Re: $ is not defined

2008-05-06 Thread motob
When ever I get the $ not defined error, its because my core jQuery library is not there, for example when I switch from jquery.pack to jquery.min and I forget to change the script tag reference in the head. Just double check that its properly referenced and that jQuery is listed above

[jQuery] Re: event data ?

2008-05-06 Thread motob
) and how to have access on it. On May 6, 6:39 pm, motob [EMAIL PROTECTED] wrote: $('.mybutton').click(function(){ alert($(this).attr(id)); //get the id $(this).attr(disabled, disabled); //disable the clicked button }); On May 6, 3:33 am, Adwin Wijaya [EMAIL PROTECTED] wrote

[jQuery] Re: .filter() and .not() approximately worthless - Table issue perhaps?

2008-05-05 Thread motob
It looks like you want to select all .foo elements that are siblings, but not the first .foo. You could try something like this $ (.foo).gt(0); This will get all .foo elements, then reduce the collection by dropping off the first element. On May 5, 4:50 am, {ajh} [EMAIL PROTECTED] wrote: My

[jQuery] Re: click(function(select) help

2008-05-05 Thread motob
an option didn't do a thing. Clicking again on first product, hid its options. @motob: I used this instead: $(.product-type).change(function(){ if($(this).val() == filters){ $('fieldset.filters').slideDown(slow); } else

[jQuery] Re: Photo Crop proposal

2008-05-05 Thread motob
Here is a link to the current UI cropper. Maybe you can help incorporate some additional features. http://ui.jquery.com/repository/real-world/image-cropper/ On May 5, 4:36 pm, Donald J Organ IV [EMAIL PROTECTED] wrote: Yes I understand that, sorry maybe my comments were a little harsh and

[jQuery] Re: click(function(select) help

2008-05-01 Thread motob
Instead of adding click listeners to the option elements, add a change listener to the overall select menu. Once the change event is fired, determine which value is choosen, then show/hide the appropriate option fieldset. NOTE: You may want to change the values of the option elements so that they

[jQuery] Re: Jquery UI Doc?

2008-04-30 Thread motob
Clicking on draggable( options ) will give you this page: http://docs.jquery.com/UI/Draggables/draggable#options. From there, click on the options tab. The same holds true to access the droppable options. On Apr 30, 8:06 am, Giovanni Battista Lenoci [EMAIL PROTECTED] wrote: Hi, till now for my

[jQuery] Re: Get number of times a link has been toggled or clicked?

2008-04-29 Thread motob
( $(this).text + ' was clicked ' + ( $(this).data('count') || 0 ) + ' times!' ); }); Much easier that binding new events and trying to manage vars. On Apr 29, 8:00 am, motob [EMAIL PROTECTED] wrote: It is possible, but has to me manually recorded by you. The best way I can think of is to use

[jQuery] Re: Jquery Ajax and Struts Issue

2008-04-28 Thread motob
Perhaps more information is needed. I am able to call Struts actions through jQuery Ajax calls. In the URL option of my Ajax request, I simply put /mypage.do and as long as the action is set up properly in Struts, it works. Post your jquery code that makes that ajax request. On Apr 28, 7:19 am,

[jQuery] Re: Get number of times a link has been toggled or clicked?

2008-04-28 Thread motob
It is possible, but has to me manually recorded by you. The best way I can think of is to use the meta data plugin (http://plugins.jquery.com/ project/metadata). You'll need to attach a click event onto each link you want tracked, then you'll need to increment a counter and store that counter as

[jQuery] Re: How to collect values out of a bunch of input checkboxes?

2008-04-03 Thread motob
Check out the jquery.form plugin found here: http://malsup.com/jquery/form/. It has form serialization methods built in. I think it may be exactly what you need. On Apr 3, 10:45 am, Matt Wilson [EMAIL PROTECTED] wrote: I have a form with a bunch of checkboxes. They all have the same name

[jQuery] blockUI and ie6 secure nonsecure

2008-04-01 Thread motob
I am using the blockUI plugin to display a caveat message as soon as a page loads. The user has to check the i agree checkbox then click the ok button to access the page. When the ok button is clicked I set a cookie and run $.unblockUI(). The site is running in secure mode and in IE6 I get the

[jQuery] Re: Selector problem

2008-03-27 Thread motob
Looks like you could do something like this: $('.exp').click(function(){ $(this).siblings('.helpCont').slideToggle('slow'); }); This is assuming that each .exp and .helpCont is going to be contained in its own .help parent div. On Mar 27, 12:25 pm, chronotype [EMAIL PROTECTED] wrote: Hello

[jQuery] Re: Problem fiding a certain text inside a table

2008-03-26 Thread motob
You could try using regular expressions on the text inside of each TD. Something like this: $(this).find(td:contains('*')).each(function(){ $(this).text().replace(/\*/g, span class='highlight'*/span); }); The above code is untested and may not work, but you get the picture. On Mar 26, 3:00

[jQuery] Re: Using a button that doesn't submit?

2008-03-24 Thread motob
The code you listed doesn't have the return false...Add the return false statement at the end of the .click() function like so... $(document).ready(function() { $('#add-image').click(function() { $('#image-next').clone(true).attr('name', function() { return

[jQuery] Re: div index

2008-02-12 Thread motob
Can you post a little more info? Maybe some of your html code that goes along with what jquery is working with? Are you trying to add a new criteria text box to a search form when #new-criteria is clicked? Are you working with table cells or divs? On Feb 12, 3:14 pm, Feijó [EMAIL PROTECTED]

[jQuery] Re: Assigning an animation toggle to a checkbox to fade a table row in/out

2008-02-11 Thread motob
Yes, fading table rows can be done, and you've almost got it. Right now your javascript will fade out all table rows in the document when any check box is clicked. $(tr).animate({ opacity: 0.2, }, 1000 ); So you need to change $(tr).animate(...) to something like $

[jQuery] [SITE SUBMISSION] Sapitot Creative

2008-01-30 Thread motob
Sapitot Creative is a Design firm that recently redesigned their website. jQuery is being used to enhance page transitions and to give a little flair to the print and web portfolio sections. What is real interesting is the unconventional use of jQuery-ui.tabs plugin for the main navigation.

[jQuery] Re: [SITE SUBMISSION] Sapitot Creative

2008-01-30 Thread motob
I had some trouble getting that history plugin to corporate with ui.tabs. I'll take another stab at it, maybe there are some updated documentation in that area. I had not run into that Loading... issue when I was running thru it, but I always waited until the transition finish. Ah the beauty of

[jQuery] clueTip activate

2008-01-10 Thread motob
I want to use the clueTip plugin to give helpful advice or help to users filling out a specific form field. But I only want the clueTip to display if they type invalid characters. For example, I only want numbers to be typed into a field. If they type letters, or any other special characters, I

[jQuery] Re: Selector for Toggled Element

2007-11-01 Thread motob
try $(table:hidden) or some form of that. On Nov 1, 2:30 pm, studiobl [EMAIL PROTECTED] wrote: I'm trying to write an if statement based on the toggled state of an element (a table, in this case). Attempting to select the table by any combination of id, class, and/or element type doesn't

[jQuery] Re: Getting a specific option in a select

2007-10-08 Thread motob
Try removing the colon (:) after the option element, like so: $('option[value*=\'2\']', $('#category_1')).size() On Oct 8, 12:11 pm, Giovanni Battista Lenoci [EMAIL PROTECTED] wrote: Hi, I'm trying to get the option with a specific value in it. This is the syntax I use and doesn't works:

[jQuery] Re: How do I get this to fade in

2007-10-08 Thread motob
You could do something like this: $(.thumbnail li).click(function(){ var thumbnailHtml = $(this).html(); $(#large li).fadeOut(fast, function(){ $(this).html(thumbnailHtml).fadeIn(slow); }); return false; }); On Oct 8, 6:47 am, skinnytiger [EMAIL PROTECTED] wrote: I'm using the

[jQuery] Re: How to hide a div without a click function

2007-10-04 Thread motob
You could also try using setTimeout() like so: setTimeout(function() { $('#slidebar').toggle(); }, 2000); This will activate the #slidebar toggle after 2000 milliseconds even is the user is trying to interact with the #slidebar which may not be what you want. I'm not sure what the slide bar

[jQuery] Re: Problem with binding mouseout to only parent div

2007-10-03 Thread motob
I would suggest using one of jQuery's menu plugins. There is a standard practice for marking up menus and sub menus using lists (ol). Look at this tutorial for suckerfish drop down menu (http:// www.alistapart.com/articles/dropdowns/). Once you have your menu properly marked up take a look at the

[jQuery] Re: Add Table row

2007-10-02 Thread motob
Yes, this is possible. I'm doing the same type of thing on my app. You'll want to utilize the .clone() function. You could do something like this: var clonedRow = $(table tr :last).clone(); //this will grab the last table row. $(#formField, clonedRow).attr(id, newID); //use the selectors to

[jQuery] Re: Slide up/down bug with table data in IE7

2007-10-02 Thread motob
I think its more of an issue of IE not handling table tags properly. I've had some unexpected results when trying to slide table rows in my app. If you're wanting to slide up and down the entire table, try wrapping a div around it and slide the div. This worked for me when I needed to show and

[jQuery] Re: IE shows nothing o.0

2007-09-20 Thread motob
I think its a problem of how you're including the library. Try writing your script line like this: script type=text/javascript src=inc/js/ jquery-1.2.1.js/script. IE can't handle the self closing script tag. I know its lame, but thats IE for ya. On Sep 20, 12:28 am, John Resig [EMAIL

[jQuery] .min.js and .pack.js

2007-08-27 Thread motob
Besides file size, what is the difference between a .min and .pack version of a js file? I see this a lot with the various plugins and jquery library. What are the pitfalls and benefits of using each?

[jQuery] Re: .min.js and .pack.js

2007-08-27 Thread motob
Ah, thank you very much. On Aug 27, 11:36 am, Stephan Beal [EMAIL PROTECTED] wrote: On Aug 27, 2:51 pm, motob [EMAIL PROTECTED] wrote: Besides file size, what is the difference between a .min and .pack version of a js file? I see this a lot with the various plugins and jquery library