[jQuery] calling function with array arguments

2009-07-15 Thread introvert
Hello. How can I pass arguments to a function as elements of an array. For instance: var somemap = { one: 1, two: 2, three: 3}; var arguments = { one, two } --we iterate through arguments array and see which should be passed to a function: call_function(somemap['one'], somemap['two']); or an

[jQuery] jquery.calculation modification

2009-07-15 Thread introvert
Hello, I need some help on jquery.calculation plugin modification (I want to change it so that it would also read the attributes of elements if a string is passed as an attribute name). I want to change the .calc function so that I could optinally pass a string with each jquery object which are

[jQuery] getting xhtml custom data in select box

2009-07-14 Thread introvert
Hello, I have the following selectbox xhtml structure: Volvo Saab Mercedes Audi Now I want to get the data:interval attribute value of the selected option. Which syntax should I use with jquery selector? Currently I have: $("select[id^=price_item_]").attr(

[jQuery] adding rule to selector syntax

2009-07-01 Thread introvert
Hello I have a simple jquery selector: $('[id^=total_item]') I would like to add a rule so that the upper code would match all elements that don't have 'locked' class (so that it wouldnt match those with class='locked'). How should I add this rule to the selector? Many thanks in advance!

[jQuery] jquery adding and removing row

2009-06-25 Thread introvert
Hello, I want to be able to add row at the end of the table with a 'remove' link which will remove specific row. The code I've managed to write so far: $(document).ready(function() { $("#add_item").click(function () { var html = "remove";

[jQuery] accesing array/variables with a function

2009-05-18 Thread introvert
Hello I'm having problems with the following code: for (var i = 0; i < images.length; i++) { var img = new Image(); img.src = images[i][0]; $(img).bind('load', function() { stack.push( $('').attr('href', images[i][1]).append(this)[0] )

[jQuery] Re: jquery object and functions

2009-05-04 Thread introvert
I get the same error. On May 4, 9:51 pm, "Jordon Bedwell" wrote: > Try: > > $(this).find('img').attr({'src':img[n][0],'alt':img[n][1]}); > > -Original Message- > From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.co

[jQuery] jquery object and functions

2009-05-04 Thread introvert
Hello. I'm having problems with the following code: var img = []; // var o = this.find('img'); o.attr('src', img[n][0]).attr('alt', img[n][1]); The error I get is: o.attr("src", img[n][0]).attr is not a function What am I doing wrong? Many thanks in advance!

[jQuery] slide/scroller to top

2009-03-25 Thread introvert
Hello How is it possible to slide scrollbar to the top with jquery? Thanks a lot for help!

[jQuery] updating content (adding new items)

2009-03-24 Thread introvert
Hello. I have a simple twitter shoutbox on my website that I would like to refresh with jquery each X seconds. At the moment I use the following code which will hide the block, load new and show it: function getTweets() { $("#twitts").fadeOut("fast"); $("#twitts").load("last-10-twitts.php", '',

[jQuery] click event and window.location problem in safari

2009-02-27 Thread introvert
Hello I have a simple jquery code that will put a link (on click event) on a division. The link is read from the anchor inside of the div: $(document).ready(function() { $("div.picture").click(function () { var url = $(this).find("a").attr('href'); window.location = url; })

[jQuery] show/hide on hover event (newbie question)

2009-02-26 Thread introvert
Hello I have a simple div inside which I want to show an image on hover (rollover) and hide on mouseout of the div. I tried doing it with toggle() but that will only change the visibility on hover. How can I do that? Thanks for help!

[jQuery] click events on links

2009-02-14 Thread introvert
Hello. I have a simple anchor href link on which I put on click event handler: $("#pause").click(function () { //do something }); When I click the link the action will be preformed and the browser would scroll to the top of the page (because of # in the href attribute). How do I prevent th

[jQuery] getting element numbers

2009-02-14 Thread introvert
Hello. I have a simple div list where one of the inner divs is being passed as a this element to the function. > How can I get the total number of divs (divisions) inside the div list? In > this case it would be 3. first second ... > How to get number of the specific div which is getting pas

[jQuery] Re: simple onclick visit event on div

2009-02-13 Thread introvert
his).find("a").attr('href'); >                 window.location = url; >         }); > > }); > introvert wrote: > > I get an error with the following code: > > > $(document).ready(function() { > > $("div.image_single").click(function () { > > var url = $(th

[jQuery] jquery serialScroll and slide element links

2009-02-13 Thread introvert
Hello. I have came across jquery serialScroll plugin which is available here: http://flesler.blogspot.com/2008/02/jqueryserialscroll.html The plugin seems to work but I'm having some problems. I made a slide show which is almost the same as the second slide show in the demo (with the pictures

[jQuery] jquery 1.3 and scrollTo plugin

2009-02-13 Thread introvert
Hello I wanted to use jquery scrollTo plugin but it seems like its incompatibile with jquery 1.3 The plugin is available on this address (demos use jquery 1.2.): http://demos.flesler.com/jquery/scrollTo/ Does anyone know of any plugin with similar functionality but with difference that it works

[jQuery] Re: simple onclick visit event on div

2009-02-13 Thread introvert
t; $(document).ready(function() { >      $("div.somediv").click(function () { >         window.location(variableName); >      }); > > }); > introvert wrote: > > Hello > > > I'd like to put onclick event on simple div and preform action to go > > to som

[jQuery] simple onclick visit event on div

2009-02-13 Thread introvert
Hello I'd like to put onclick event on simple div and preform action to go to some variable's url. $(document).ready(function() { $("div.somediv").click(function () { //visit / go to some url }); }); How can I do that? Thanks a lot for help!

[jQuery] Re: processing all links on page with jquery

2009-02-12 Thread introvert
nefit). Thanks again! On Feb 12, 11:25 pm, James wrote: > $(this) will refer to the one that was clicked on. > > $(document).ready(function() { >  $("a.rate").click(function () { >     alert($(this).attr('href')); >  }); > > }); > > On Feb 12, 12:20 pm,

[jQuery] Re: processing all links on page with jquery

2009-02-12 Thread introvert
rate").click(function () { //ajax call });}); > > > > rate up > rate up > > On Feb 12, 12:08 pm, introvert wrote: > > > Hello. > > > I'm working on a simple thumbs up/down functionality with javascript > > (jquery). I have list of entries which can be r

[jQuery] processing all links on page with jquery

2009-02-12 Thread introvert
Hello. I'm working on a simple thumbs up/down functionality with javascript (jquery). I have list of entries which can be rated up or down and this has to be done with ajax. I came to a design consideration problem as I dont have many experience with javascript programming: How should I process

[jQuery] Re: select inside an object

2009-02-10 Thread introvert
Thanks for help! On Feb 10, 2:12 am, Mike Alsup wrote: > > $(form).('select')[0].selectedIndex = 2; > > > But this wont work. > > What am I doing wrong? How should I use object subselectors? > > $(form).find('select');

[jQuery] select inside an object

2009-02-09 Thread introvert
Hello, I have a jquery object (form) and I would like to select a "select" form element inside of it. This code will work as expected: $('#rating select')[0].selectedIndex = 2; >> It will set the selectedIndex inside #rating id to select field. var form is basically #rating and I want to do t

[jQuery] appying addClass to proper element (jquery 1.1 -> jquery 1.3.)

2009-02-09 Thread introvert
Hello, I'm doing a modification on a javascript that is written for jquery 1.1 and wont work with jquery 1.3. Heres is the shortened original code: stars = $("div.star", obj), ... stars.lt(rating[0]).addClass("on"); //critical line that causes error I changed the line above to: $("div.star:l