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
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
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
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.
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
$('.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 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
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
) 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
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
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
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
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
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
( $(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
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,
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
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
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
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
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
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
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]
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 $
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.
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
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
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
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:
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
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
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
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
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
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
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?
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
37 matches
Mail list logo