[jQuery] Re: how to do some animation when the page loads?

2010-01-09 Thread Rick van Hoeij
Hey Oliur, You could just do that after the document ready: $(document).ready(function(){ $(".divname").animate({ opacity: 0.5, }, 300 ); }); That should do the trick, I think. Greetz, Rick On Jan 9, 2:53 pm, Oliur wrote: > when the DOM is ready you can write > > $(document).re

[jQuery] Re: looping through form elements.

2010-01-09 Thread Rick van Hoeij
xplained  $(this).attr should > do the trick with grabbing what type the input element is. I > appreciate your help.  I had to change  .input to :input since I'm > filtering out by the element not by a class named input. > > -Thanks, >      Rich > > On Jan 8, 7:11 

[jQuery] Re: Getting Div to Show after mouseout

2010-01-08 Thread Rick van Hoeij
Hey, I would add another class to the div you want to show. That way you can keep it selected until you go over another div. Like this: $("a.mSelect").hover( function () { $('.selected').each(function(){ $(this).removeClass('selected'); $(this).hide(); });

[jQuery] Re: Getting Div to Show after mouseout

2010-01-08 Thread Rick van Hoeij
Hey, I would add another class to the div you want to show. That way you can keep it selected until you go over another div. Like this: $("a.mSelect").hover( function () { $('.selected').each(function(){ $(this).removeClass('selected'); $(this).hide(); });

[jQuery] Re: Getting Div to Show after mouseout

2010-01-08 Thread Rick van Hoeij
Hey, I would add another class to the div you want to show. That way you can keep it selected until you go over another div. Like this: $("a.mSelect").hover( function () { $('.selected').each(function(){ $(this).hide(); }); var month = $(this).attr("rel"); $(

[jQuery] Re: looping through form elements.

2010-01-08 Thread Rick van Hoeij
Hey, Maby this will help: $('.input').each(function(){ alert('Value: ' + $(this).val() + ' - Type: ' + $(this).attr ('type')); }); That should do the trick. Just let me know. Greetz, Rick On Jan 7, 11:33 pm, rich wrote: > Hello all, I'm relatively new to JavaScript.  I would like to loop

[jQuery] Re: jQuery attaching actions to links with different class

2009-12-19 Thread Rick van Hoeij
I would use: $('a').click(function(){ var car_id = parseFloat($(this).attr('class')); $('#' + car_id).show(); }); Haven't tested this, but should work if I read your description right. Greetz, Rick On Dec 18, 1:57 pm, imot3k wrote: > Hi, > > I'm making a website for a garage. In the car

[jQuery] Re: jquery text problem.

2009-12-19 Thread Rick van Hoeij
I usually use this code: $('#textbox_id').val() But I don't know id it is different in .net Hope this helps. Greetz, Rick On Dec 19, 11:48 am, suresh kumar wrote: > I am using jquery block to show the popup window. In which the popup > has two textboxes with two buttons. When user clicking th

[jQuery] Re: Return values

2009-12-14 Thread Rick van Hoeij
because of the async of javascript I normally use callback functions to do the value passing. So instead of return true or return false in a ajax function, it's better to call a function with the true or false as a parameter. Just my two cents ;) On 12 dec, 20:24, Jojje wrote: > How deep in the

[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: Is mouse inside a div?

2009-11-16 Thread Rick van Hoeij
Hey, Don't know if you mean when you hover over a div? Cause then you should just use the hover event: $('#divid').hover(function(){} //Implement code while hovering ,function(){ // Implement code when you exit the div }); Hope this helps. Greetz, Rick

[jQuery] Re: Is mouse inside a div?

2009-11-16 Thread Rick van Hoeij
Hey, If you are referring to hovering your mouse over a div there is the hover event: $('#divid').hover(function(){ // Implement code while mouse is hovering div },function(){ // Implement code while mouse leaves div }); There are different mouse events too. Check them out at: http://docs.