[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: Ajax error handling & textStatus

2009-12-09 Thread Cameron van den Bergh
k for an error. > > http://docs.jquery.com/Ajax/jQuery.get#urldatacallbacktypehas some > more information on that. > > -T.J. > > On Dec 9, 6:30 am, Cameron van den Bergh > > > > wrote: > > Good day, > > > When executing an ajax request, i've noticed t

[jQuery] Re: Performance Problems with Suggestion Plugin

2009-12-09 Thread Cameron van den Bergh
Hi, To improve efficiency, try using contexts in order to restrict the parsed DOM elements. For example, if you know that all targeted elements are in . stuff .. target text... . then you should guide the selector engine towards the target : $('#main .myclass '). Another synataxe

[jQuery] Ajax error handling & textStatus

2009-12-09 Thread Cameron van den Bergh
Good day, When executing an ajax request, i've noticed the following problems : - the textStatus callback parameter is always set to success ; - the callback isn't triggered if a download error occurs (404 for example). I understand that the second problem might be unsolvable but is there any way

[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.

Re: [jQuery] jQuery Validation request

2009-11-03 Thread Bart van Uden
Hi Richard, I also live in the Netherlands and ran into the same problem. I couldn't find an answer online so i decided to write some addon methods myself. I added the following two methods to the validator and that did the trick. $.validator.addMethod("maxNL", function(value, element, param) {

[jQuery] JQuery Scrollbar value

2009-08-04 Thread Paul van Hoven
I can't figure out how to check with jquery how deep a user has scrolled into a page. Suppose you got a webpage with 3000px in height but the actual viewport is just 768px high. So the user has to scroll down to see the rest of the page. How do i get the current vertical scroll value of the page.

[jQuery] Re: peculiar behaviour of clone

2009-06-23 Thread browny van
Thank you, that is what i wanted.

[jQuery] [ lCarousel Lite ] Can't drag items outside Carousel

2009-06-13 Thread VaN
Hello, I'm trying to merge Carousel and Drag functions, but I'm facing problem. Here is the jCarousel lite page : http://www.gmarwaha.com/jquery/jcarousellite/ And here is my project : http://www.wir3d.net/tests/carousel_drag_02.html Carousel pager works great, when you click a page, carousel

[jQuery] Re: [validate] add regex for password

2009-05-29 Thread VaN
lugins/Validation/Methods/digits > > Jörn > > On Thu, May 28, 2009 at 4:03 PM, VaN wrote: > > > Hi, > > > I'm trying to make my password field regex-valid, but don't know what > > to add. > > > Here is my code : > > > $.validator.add

[jQuery] [validate] add regex for password

2009-05-28 Thread VaN
Hi, I'm trying to make my password field regex-valid, but don't know what to add. Here is my code : $.validator.addMethod("integer", function(value, element) { return !jQuery.validator.methods.required(value, element) || /^\d+$/ i.test(value); } , "Numbers only

[jQuery] [beginner] passing variables to a Jquery function

2009-03-30 Thread Peter Van Dijck
Hi all,I couldn't find a good answer to this, although it has probably been answered before, apologies! I have a link do it And some jQuery code $("#doit").click(function(){ // upon click $.get(this.href); // call the URL $('#doit').replaceWith("I've been there (undo)"); return false; }); My p

[jQuery] Re: Condense this function

2009-01-15 Thread James Van Dyke
is for free, in my spare time, to learn > more about database calls, php, and js) and paints the data set that > was queried down the page in sticky notes. It randomizes the color of > the notes, and onload fades them in. There may be 50 stickies, or as > few as one or two. Its pretty neat

[jQuery] Re: ajax :: how to load script

2009-01-15 Thread James Van Dyke
The simple solution would be to use $.getScript(url, callback). However, know that if you insert HTML anywhere in the page using jQuery, it will search for and execute any script tags in that HTML automatically. For example: $.get('/my/url/with/html_and_jscript.html', function(data) { $("#e

[jQuery] Re: getJSON - how to retrieve plain text?

2009-01-14 Thread James Van Dyke
It's almost certainly giving you an error about cross-domain XHR requests. Simply, you can't call URL's that start with "http://"; or else it will throw an error. Someone else may know how to get around that, but if you're referring to your own host, just use a relative path. To debug the issue

[jQuery] Re: Condense this function

2009-01-14 Thread James Van Dyke
! > > On Jan 14, 11:28 pm, James Van Dyke wrote: > > > $(function() { > >     var i, numStickies = 9; > >     for (i = 1; i <= numStickies; i += 1) { > >         setTimeout( function() { > >             $(".sticky" + i + ":hidden").fadeI

[jQuery] Re: Standards box model

2009-01-14 Thread James Van Dyke
I've always used transitional and had no problems, even with 1.3. Transitional is still a standard, but let's some things slide. However, if you're so concerned with bugs, you may want to wait until 1.3.1 or later. 1.3 is bound to have some lurking issues. On Jan 15, 12:15 am, Karl Rudd wrot

[jQuery] Re: IE Problem with (function($)

2009-01-14 Thread James Van Dyke
The initial (function($) { was never closed. Here's how I formatted it so everything lines up: (function($){ var EYE = window.EYE = (function() { var _registered = { init: [] }; return { init:

[jQuery] Re: $("area") not working in IE (sorry if this is a repost)

2009-01-14 Thread James Van Dyke
Ok... that's a hard page to get away from with all those alert boxes. I know... no Firebug in IE. Poo. I believe that "class" is not what IE calls that attribute. For instance, element.class will return nothing. element.className is the correct property. Try that. Plus, you could shorten you

[jQuery] Re: Issue upgrading to 1.3

2009-01-14 Thread James Van Dyke
Try $("#emilyLogin:not(.loggedIn), #joeLogin:not(.loggedIn)").click( function(){} ); I'm thinking that the nested IDs are causing issues that the new selector engine can't handle. Since IDs are supposed to be unique per page, listing a hierarchy is unnecessary. Multiple IDs on a page woul

[jQuery] Re: Condense this function

2009-01-14 Thread James Van Dyke
$(function() { var i, numStickies = 9; for (i = 1; i <= numStickies; i += 1) { setTimeout( function() { $(".sticky" + i + ":hidden").fadeIn(500); }, 100 * i); } }); Not sure if that's faster, but it's shorter and easier to change. On Jan 14, 11:19 pm, DJ

[jQuery] Problems with the New API Browser

2009-01-14 Thread James Van Dyke
Does anyone else find the new API browser to be a bit cumbersome? My gripes: 1) No "back" link at top of vertical navigation list. You must click the category to cancel your choice and essentially go back. However, this isn't very intuitive and there aren't any affordances to this behavior sa

[jQuery] Re: Performance penalty for creating dom element from a string?

2009-01-14 Thread James Van Dyke
is a tag which doesn't require an ending tag. is another as is . The W3C validator will actually warn you if you end tags like that, though it's not a big deal. When jQuery creates the HTML, I believe the code is injected into an empty element and jQuery sees what the browser made of the stri

[jQuery] Select nodes with namespaced attribute

2008-09-03 Thread Luke Van In
rk in jQuery. Does anyone have any advice on how to do this? -- Luke Van In Alio Technologies www.aliotech.com

[jQuery] Re: Taconite problem

2008-07-14 Thread Peter Van Dijck
Thanks, LiveQuery did it. (I'm a beginner :)) Peter On Jul 14, 8:27 pm, Mike Alsup <[EMAIL PROTECTED]> wrote: > > Hi, > > I'm having a little problem, perhaps someone can help me figure this > > out because I'm a bit baffled. > > > In short: a link is clicked, I call a page with jquery ajax (the

[jQuery] Taconite problem

2008-07-14 Thread Peter Van Dijck
Hi, I'm having a little problem, perhaps someone can help me figure this out because I'm a bit baffled. In short: a link is clicked, I call a page with jquery ajax (the href of the link is not followed). The page returns taconite xml, so far so good. But then if I click the link that was changed

[jQuery] Re: :contains ... troubling behavior

2008-05-29 Thread Eugene Van den Bulke
On Thu, May 29, 2008 at 2:45 AM, Dave Methvin <[EMAIL PROTECTED]> wrote: > >> it does the job but I still find the behavior unexpected :P > > How could the documentation be changed to clarify the function so that > you would expect its behavior? > > http://docs.jquery.com/Selectors/contains#text

[jQuery] Re: :contains ... troubling behavior

2008-05-29 Thread Eugene Van den Bulke
a screen shot to illustrate my point ... if I can venture an non-expert diagnostic, it seems that in the second case jQuery considers that the html in the contains() statement is the "context" of the statement and not the html document ... EuGeNe -- http://www.3kwa.com <>

[jQuery] Re: this:contains selector

2007-12-13 Thread Van
thing like this might work...not tested. > $(this).is(":contains(matchingText)") > > Glen > > On Dec 12, 2007 4:55 PM, Van <[EMAIL PROTECTED]> wrote: > > > > > The contains selector works fine with tags (a:contains()) etc. but > > doesn't se

[jQuery] Re: using :contains() selector with $(this)

2007-12-13 Thread Van
) on the resulting > element, or modify the query slightly. > > As I said at the start, which method (or variation thereof) you choose > to use is down to what else you want to do with the result (or lack > of). None of the above are either 'right' or 'wrong', they

[jQuery] this:contains selector

2007-12-12 Thread Van
The contains selector works fine with tags (a:contains()) etc. but doesn't seem to work with $(this). What is the best way to use contains with "this"?? here is my scenario: var matchingText = "Text2"; Text1 Text2 I want to see if the text in matchingText matches text in any of the anchor ta

[jQuery] using :contains() selector with $(this)

2007-12-12 Thread Van
Hello, I have a question about using the :contains filter to match the text of an anchor tag... Text 1 Text 2 ... I'm trying to use the ul.list selector to run through all anchor tag descendants and check their .text() to see if it matches a query. $(this:contains()) does not work, and I tri

[jQuery] Re: jQuery.dequeue is not a function

2007-10-22 Thread Christiaan van Woudenberg
I've found a few places in the interface plugin libs where the old version of dequeue is used; they need to be replaced with the new calls to work. The old version took two arguments, the new version uses jQuery chainability. For example: On line 473 of ifx.js change : jQu

[jQuery] Re: Release: jQuery treeview plugin 1.3

2007-10-12 Thread Christiaan van Woudenberg
FYI, this version of Treeview raises warnings when validating against JSLint in a few critical areas, and causes the JS compressor that I use by LCASoft ( http://www.lcasoft.com/compress-js.html ) to break the plugin. In SVN revision 3522, they are: * On line 67, asignment not terminated with ; *