[jQuery] Re: on_mouse_over scrolling

2009-04-19 Thread victorg
day. On Apr 18, 4:00 am, victorg vr.gerrit...@gmail.com wrote: I think you could easily accomplish that by defining an mouseover handler for your button that does a setInterval() to a function that scrolls your container. The scrolling of your container would be accomplished by fooling

[jQuery] Re: defaultValue in form

2009-04-18 Thread victorg
It works just fine if you switch the focus with the blur and use attr () correctly :) attr(prop) = retrieve property attr(prop, value) = set property $(#q).focus(function () { if ($(this).attr(value) == $(this).attr(defaultValue)) { $(this).attr(value, ''); }

[jQuery] Re: on_mouse_over scrolling

2009-04-18 Thread victorg
I think you could easily accomplish that by defining an mouseover handler for your button that does a setInterval() to a function that scrolls your container. The scrolling of your container would be accomplished by fooling around with the scrollTop() function. I've put together a test script:

[jQuery] Re: Using $.load() and $.blockUI [blockUI.js]

2009-04-18 Thread victorg
Where in your code are you trying to do this? You should use it like this: $(#content).appendTo (#itemwherecontentneedstobeappendedto); On Apr 18, 12:42 pm, Colonel tcolo...@gmail.com wrote: Hi all, how I can add content from div to div? For example, I have code: .. script

[jQuery] Re: How to Enable a Disabled Context Menu

2009-04-18 Thread victorg
I tried your code, but for me it works just fine? On Apr 18, 10:47 am, Mohsen Saboorian mohs...@gmail.com wrote: I've disabled context menu, on page ready, using the following code: function contextMenu(e){         return false;} function disableContextMenu() {        

[jQuery] Re: Menu Hover and Selected

2009-04-18 Thread victorg
Hmm, i've eaten better things :-P I tried to make it work using Firebug but its not a big success, since i cant attach new events after unbinding them somehow.. I think this should work: http://pastebin.com/m4c657bc9 Basically, what i am trying to do is this: Check what the active URL is right

[jQuery] Re: Unable to refer to a select element

2009-04-18 Thread victorg
Is it impossible in jQuery to select an element as I do here (var yearFrom=$(:input[type=select][name=yearFrom]);)? Marc Yes, i think you should do it like this instead $(select [name=yearFrom]); jQuery will look for an element which actually has a type=select attribute. button

[jQuery] Re: Merge 2 divs [jQuery]

2009-04-18 Thread victorg
It should work. Have you tried it like this? $(#div1).load(file.php).appendTo(#div2); Or specify a callback when the results are loading and then append it: $(#div1).load(file.php, function() { $(this).appendTo(#content); }); On Apr 18, 3:14 pm, Colonel tcolo...@gmail.com wrote: Hi all, I

[jQuery] Re: Syntax

2009-04-18 Thread victorg
Well, i have noticed you used an atrribute/value with the same name For example: $(a.link).animate( { color: color }, 1000); I think i've had issues with that in the past as well. Might want to try to change it into: $(a.link).animate( { color: color2 }, 1000); On Apr 18, 5:26 pm, Karl

[jQuery] Re: How do I set the value of a form element?

2009-04-12 Thread victorg
script language=text/javascript -- script type=text/ javascript On Apr 12, 3:29 pm, webguy262 webguy...@yahoo.com wrote: I'm sorry for being so thick, but I'm stuck. Please, can someone view the source of this page... http://www.eastexhaust.com/jquerytest.html ...and tell me why it is

[jQuery] Re: Fade Pictures In and Out

2009-04-11 Thread victorg
The problem is that you cant set the opacity of an background-image itself, it will change the opacity for the entire element. So, my solution is: 1. Create an element inside the element you want to fade (fading element) 2. Give it the same dimensions as the parent element 3. Set the parent's

[jQuery] Re: JQGrid .setGridParam() causing error

2009-04-11 Thread victorg
$(#results).setGridParam is not a function This usually means that #results cannot be find in the DOM, are you sure this is the correct element? Else i wouldn't know unless you supply a bit more of your source code. On Apr 10, 9:05 pm, Chuk violinssoundc...@gmail.com wrote: Hi.  I'm

[jQuery] Re: Menu Hover and Selected

2009-04-11 Thread victorg
Maybe you should switch it to make use of the mouseover event only, and on mouseover change all menu items to off status and set the curret one to on? $(.nav a img).mouseover(function() { // clear all menu items with _on img $(.nav a img).each(function(){

[jQuery] Re: Find and replace character inside div

2009-04-11 Thread victorg
I think you would be best off with a Regular Expression: var f = $(#fruits); f.html( f.html().replace(/;/g,br/) ); /g enables global matching. When using the replace() method, specify this modifier to replace all matches, rather than only the first one.

[jQuery] Re: Menu Hover and Selected

2009-04-11 Thread victorg
and then change back to the unselected state, but the one that is selected (page you are on) to stay selected. victorg-2 wrote: Maybe you should switch it to make use of the mouseover event only, and on mouseover change all menu items to off status and set the curret one to on?  $(.nav

[jQuery] Re: change LI class onclick of A inside

2009-04-11 Thread victorg
The problem is that you are selecting li items which have the class glossymenu (li.glossymenu). While you actually need :ul.glossymenu li. So something like this should work :) $(ul.glossymenu li).bind(onclick,function(){ $(ul.glossymenu li).removeclass('current');

[jQuery] Re: change LI class onclick of A inside

2009-04-11 Thread victorg
Oops, forgot the case on removeClass and addClass: $(ul.glossymenu li).bind(onclick,function(){ $(ul.glossymenu li).removeClass('current'); $(this).addClass('current'); }; ); On Apr 11, 3:50 pm, victorg vr.gerrit...@gmail.com wrote

[jQuery] Re: Menu Hover and Selected

2009-04-11 Thread victorg
Guess i made a mistake again. :P This should work now, if not i'll eat my shoe. $('.nav a img').hover( function(){ if($(this).attr(src).indexOf(_on) == -1) { var newSrc = $(this).attr (src).replace(.png,_on.png);

[jQuery] Re: Menu Hover and Selected

2009-04-11 Thread victorg
Small correction.. var activePage = window.location.pathname.substr(1); $(a[href=+activePage+] img).trigger(mouseover);

[jQuery] Re: jQuery loop help

2008-11-30 Thread victorg
If you just want the loop index, it's passed to the .each() callback as the first parameter:     $('a').each( function( i ){         // 'i' is the loop index         $(this).click(function(){             // You can use 'i' directly in this code         });     }); Now,