[jQuery] how to multiple images slideshow with jquery cycle plugin
Hi , i am new to jquery cycle plugin I would like to make a multiple images slideshow with jquery cycle plugin Say I have 12 images and I want to show 3 at a time and cycle through the 12 in this fashion: (img1-img2-img3) then (img2-img3-img4) then (img3-img4-img5). (img11-img12-img1) auto scroll on mouseover i need it to be paused and mouseout it should continue.. Thanks in advance And
[jQuery] Re: Ajax to return more values
That's a good point, but in my case I will stick with regex. Another idea is to use multiple top html elements (divs for example) and then query for values of div you want. On Dec 1, 6:11 pm, "Andy Matthews" <[EMAIL PROTECTED]> wrote: > If you're using a 3rd party JSON library, then you'd just pass in whatever > language construct you've got and let the library encode for you. > > andy > > -Original Message- > From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On > > Behalf Of me-and-jQuery > Sent: Monday, December 01, 2008 11:04 AM > To: jQuery (English) > Subject: [jQuery] Ajax to return more values > > Ho-ho-ho. > > I wonder what is the best practice if I want to get 2 or three values back > to function with ajax. The last value would be lots of html code and first > two kind of state values (number or short string). I don't like jSON a lot, > since you need to return one-line response and you must be careful with a > shape (" and }). Second option is having a regex to fetch first two values > and all remaining is a third value. > > And what do you think is the best solution here? > > Happy December, > me-and-jQuery
[jQuery] Ajax to return more values
Ho-ho-ho. I wonder what is the best practice if I want to get 2 or three values back to function with ajax. The last value would be lots of html code and first two kind of state values (number or short string). I don't like jSON a lot, since you need to return one-line response and you must be careful with a shape (" and }). Second option is having a regex to fetch first two values and all remaining is a third value. And what do you think is the best solution here? Happy December, me-and-jQuery
[jQuery] Re: How do I remove a plugin melodramatically
One option is to use unbind on the event that this plugin uses. $. ("element").unbind("click"); Anyone has any other solution? On Oct 10, 9:21 pm, Dan M <[EMAIL PROTECTED]> wrote: > All, > > If I were to add a plugin to an element on a page, say clueTip. How > could I remove the plugin from the element when I want without > reloading the page? > > Regards, > Dan
[jQuery] Re: Unable to use jquery with Firefox
Hm... Everything seems to be OK (except break lines in the code). Try this one, it should work. $(document).ready(function() { $("a").click(function() { alert("Hello world!"); }); }); Link On Oct 5, 8:42 am, samr <[EMAIL PROTECTED]> wrote: > I just started on with jquery using > Firefox - 3.0.3 > Firebug - 1.2.1 > > The helloworld example using jquery is not loading with firebug and > just keeps on cycling. > I have disabled all plugins, still the result is same. > > The firebug script seems to be stuck at line #679 > "jQuery.cache[ id ][ name ] :" > > Following is the html: > > > > > >
[jQuery] Re: Possible to set metadata parameter dynamically?
Well, I meant with attr("data","{ id : 6}")... my mistake. On Oct 4, 10:24 pm, me-and-jQuery <[EMAIL PROTECTED]> wrote: > So is it possible to change the value of metadata parameter? Lets say > we have . > > Or is the only way to change it with attr("id","6")? I have more > parameters for element, so this is not an elegant solution. > > Thanks.
[jQuery] Possible to set metadata parameter dynamically?
So is it possible to change the value of metadata parameter? Lets say we have . Or is the only way to change it with attr("id","6")? I have more parameters for element, so this is not an elegant solution. Thanks.
[jQuery] Re: Metadata parameter as selector
Erik, this is the solution I was looking for. Thanks also for making test page live. While we have there two solutions, I did a benchmark for both and here are the results, just for fun (1000x loop). :) Ricardo: 2406ms Erik: 2812ms (with filter) Thanks again to both of you. On Sep 30, 12:07 am, me-and-jQuery <[EMAIL PROTECTED]> wrote: > Thanks ricardo, this one is tricky but it works. :) > > Amardeep, I was talking about querying parameters defined with > metadata plugin, not classic DOM id. > > On Sep 29, 10:44 pm, ricardobeat <[EMAIL PROTECTED]> wrote: > > > You can use the attribute filters: > > > $('table tr[data*=id:4]') > > >http://docs.jquery.com/Selectors > > > - ricardo > > > On Sep 29, 2:23 pm, me-and-jQuery <[EMAIL PROTECTED]> wrote: > > > > I am searching the web and documentation and still can't find a > > > working solution. > > > > I have a table which rows has also id with metadata, for example > > data="{id:4}"> > > > > And now I want to select row with id 4. I was trying many ways but no > > > success for now. For example: > > > > $.metadata.setType("attr", "data") > > > $("table tr.id:4").metadata().remove(); > > > > Anyway, is this possible with metadata at all? Thanks for any help.
[jQuery] Re: Metadata parameter as selector
Thanks ricardo, this one is tricky but it works. :) Amardeep, I was talking about querying parameters defined with metadata plugin, not classic DOM id. On Sep 29, 10:44 pm, ricardobeat <[EMAIL PROTECTED]> wrote: > You can use the attribute filters: > > $('table tr[data*=id:4]') > > http://docs.jquery.com/Selectors > > - ricardo > > On Sep 29, 2:23 pm, me-and-jQuery <[EMAIL PROTECTED]> wrote: > > > I am searching the web and documentation and still can't find a > > working solution. > > > I have a table which rows has also id with metadata, for example > data="{id:4}"> > > > And now I want to select row with id 4. I was trying many ways but no > > success for now. For example: > > > $.metadata.setType("attr", "data") > > $("table tr.id:4").metadata().remove(); > > > Anyway, is this possible with metadata at all? Thanks for any help.
[jQuery] Metadata parameter as selector
I am searching the web and documentation and still can't find a working solution. I have a table which rows has also id with metadata, for example And now I want to select row with id 4. I was trying many ways but no success for now. For example: $.metadata.setType("attr", "data") $("table tr.id:4").metadata().remove(); Anyway, is this possible with metadata at all? Thanks for any help.
[jQuery] Re: Multiple AJAX calls problem
Hey Brad. I went through these blog posts - articles - months ago, when I was looking for a problem of inactive elements returned by ajax call (and also found these three plugins, which I don't like so much). So if a solution is on that level and not on any special certain jquery integrated method then I will find the best way. Thanks again Brad. But there is not only mentioned keydown function, there are also some other things so I should be pretty watchful. Have a nice day. On Sep 2, 3:29 am, Brad <[EMAIL PROTECTED]> wrote: > Basically, that article, and its "Part 1" which is linked at its > beginning, talk about the various ways to work around the behavior you > are seeing. Seehttp://docs.jquery.com/Frequently_Asked_Questions#Re-binding > > Yes that solution is mentioned. Even though micah's suggesting his is > "quick and dirty" it is a viable solution. The Part 1 article, which > can be found > here:http://www.learningjquery.com/2008/03/working-with-events-part-1, > contains 3 links to plugins that may help you manage this situation. > Note that the plugin links are in the first paragraph and labeled > "these three plugins". Note that each word in that link is a separate > link. > > On Sep 1, 4:37 pm, me-and-jQuery <[EMAIL PROTECTED]> wrote: > > > Hi Brad. Here I can see the same hint as micah was talking about > > (unbind and then bind). Or do you have any other solution in mind? > > Thanks. > > > On Aug 31, 2:51 am, Brad <[EMAIL PROTECTED]> wrote: > > > > Have a look at the article > > > athttp://www.learningjquery.com/2008/05/working-with-events-part-2.
[jQuery] Re: Multiple AJAX calls problem
Hi Brad. Here I can see the same hint as micah was talking about (unbind and then bind). Or do you have any other solution in mind? Thanks. On Aug 31, 2:51 am, Brad <[EMAIL PROTECTED]> wrote: > Have a look at the article > athttp://www.learningjquery.com/2008/05/working-with-events-part-2.
[jQuery] Re: Multiple AJAX calls problem
micah, thanks for you contribution, but I smell much better solution here. Thanks for any quick hint. On Aug 29, 11:38 pm, micah <[EMAIL PROTECTED]> wrote: > a common trick i use to get around situations where an event may be > bound twice is to add an unbind into the chain. like so: > > var kd = function(event) { > alert(event.keyCode); > > } > > $().unbind('keydown', kd).keydown(kd); > > it's a bit quick and dirty, but it works. > > -micah > > On Aug 29, 9:12 am, me-and-jQuery <[EMAIL PROTECTED]> wrote: > > > Hello. So I have a problem that when I get jQuery code in ajax > > response and you click few times to activate ajax call, there are > > multiple instances of same code. Lets see the example with keydown. > > > FILE 1: > > > > $(document).ready( > > function() { > > $("#my_div").click(function() { > > $.ajax({ > > type: "GET", > > url: "test.php", > > success: > > function(data) { > > > > $("#div_ajax").html(data); > > } > > }) > > }) > > } > > ) > > > > Click here > > > > > FILE 2 - AJAX RESPONSE: > > > > $().keydown(function(event) { > > alert(event.keyCode);}); > > > > > Ajax content loaded... > > > So, if I click on my_div twice, there will be two listeners for keys > > and for same keydown two alerts. > > > I can solve this issue with ifs, but what is the best way to prevent > > this behaviour? Maybe in the way of singletons or something? > > > Thanks for any advice, I am sure there must be simple and effective > > solution. Have a nice day.
[jQuery] ajax?
what i'm trying to do is have a login form on my site, it looks like this right now... Email: Password: then when you click submit it uses ajax to load the login page that checks if you entered the right email and password. if you didn't, it would show the login form again. but if you try to login again, nothing happens. why is this not working??
[jQuery] Multiple AJAX calls problem
Hello. So I have a problem that when I get jQuery code in ajax response and you click few times to activate ajax call, there are multiple instances of same code. Lets see the example with keydown. FILE 1: $(document).ready( function() { $("#my_div").click(function() { $.ajax({ type: "GET", url: "test.php", success: function(data) { $("#div_ajax").html(data); } }) }) } ) Click here FILE 2 - AJAX RESPONSE: $().keydown(function(event) { alert(event.keyCode); }); Ajax content loaded... So, if I click on my_div twice, there will be two listeners for keys and for same keydown two alerts. I can solve this issue with ifs, but what is the best way to prevent this behaviour? Maybe in the way of singletons or something? Thanks for any advice, I am sure there must be simple and effective solution. Have a nice day.
[jQuery] Re: tablesorter.js default sort
Hello. This is exactly what I also need (for specific row specific first-click order). But I found simple turnaround with writing own parser which add negative sign (-) at the begining (I know that css still shows wrong order, but ok, the main problem is solved with that). But I would love if we would be able to set the first-click order through metadata. On Aug 12, 7:57 pm, MorningZ <[EMAIL PROTECTED]> wrote: > oops. allow me a correction: > > your original post made me think that it was a good > idea to be able to sort DEscending on the first click (it was > requested > by some users of my application)
[jQuery] Re: Minimizing jQuery library
Mike, thanks for your cool post. Last two hours I was doing just the same thing as you have suggested and came to a few results with limitations: - minified version of needed code without ready and sliding is 8k, without sliding but with ready 16kb and 42kb with sliding. Probably here is the best idea to get JSON functionality out of jQuery (or use yours JSONP) and find one simple sliding script. PS: I am not a fan of gzipping, sounds pretty uncommon to me. On Aug 24, 1:23 am, "Michael Geary" <[EMAIL PROTECTED]> wrote: > If you just need a basic JSONP (with callback), you might want to remove the > Ajax library in its entirety and just use a basic JSONP function. > > For the rest, I would get your app working, and then start going through the > jQuery code commenting out whatever you don't think you're using. Then test > your app. You'll probably find a few things you commented out that you have > to put back in, but those are easy to spot. This is why you comment out code > rather than deleting it. > > Watch out for silly syntax errors like extra commas or missing commas that > result from commenting out part of an object literal. > > Any good programmers' editor should let you select a range of lines of code > and with a single keystroke comment or uncomment the entire range (or do the > same with a text selection within a line of code, using the appropriate > comment characters in each case). If your editor doesn't do this, go get the > free Komodo Edit: > > http://www.activestate.com/Products/komodo_edit/ > > You could approach the Ajax plugin this same way, but it's complicated > enough that it would be hard to strip it down to a simple function call - > and JSONP only takes a dozen lines of code. See my ancient JSON plugin for > one example: > > http://mg.to/2006/01/25/json-for-jquery > > If you start from the uncompressed jquery-1.2.6.js on the website, watch out > for the exact point where the ajax plugin begins and ends - it's not exactly > on a line break. You can check out the code from svn and get the individual > files that go into jquery-1.2.6.js to see what's what. > > Once you have the code commented out that you aren't using, run it through > Packer or JSMin, then GZip it, and see how you've done! All of the > commented-out code will be gone from your download. > > -Mike > > > From: me-and-jQuery > > > Well, in my case, I need JSON call not classic ajax. I know > > other functionalities are simple in JS, but JSON call and > > sliding is a must. > > Max file can be 5-10 kb from my calculations. > > > What about removing functions from jQuery library which I > > don't need and have no effect on "engine" and needed > > functionality? Do you have any experience with that? > > > Thanks in advcance.
[jQuery] Re: Minimizing jQuery library
Well, in my case, I need JSON call not classic ajax. I know other functionalities are simple in JS, but JSON call and sliding is a must. Max file can be 5-10 kb from my calculations. What about removing functions from jQuery library which I don't need and have no effect on "engine" and needed functionality? Do you have any experience with that? Thanks in advcance. On Aug 23, 3:16 am, Dave Methvin <[EMAIL PROTECTED]> wrote: > > All what I need is selector for ID, html function, ajax call, > > element toggling and sliding (slideDown). > > The first three are easy enough that you don't need a library, you > could just use trivial wrappers around getElementById, innerHTML, and > XMLHTTPRequest. If you are willing to settle for simple immediate show/ > hide, you could again get by without a library and just use a simple > change to the CSS display attribute. All the code for that would > probably be 2KB max. > > If you really need animated toggling and sliding, that is tricky to > get right on all browsers and I would just use the unmodified of > jQuery; it isn't really that big considering what it offers you. Once > it's down on the client it is cached.
[jQuery] Minimizing jQuery library
I would like to minimize the size of library file to minimum with my specific wanted functionalities. All what I need is selector for ID, html function, ajax call, element toggling and sliding (slideDown). What size of library do you think could be the minimum in my case (minified version). I have no experience with rebuilding libraries. Thanks and have a nice day.
[jQuery] click(function(select) help
Hi again, I have a form with products select menu. I would like to show and hide product specific options as the user selects them. Now, I can show the product options but I don't know how to hide them if the user selects a different product. My HTML is: snip... -Select- Product A Product B ... ... snip My code at the moment is: $('#orderform').find('.options').hide(); $('.product-type').find('option.producta').click(function(select) { $('fieldset.producta').slideDown("slow"); }); $('.product-type').find('option.productb').click(function(select) { $('fieldset.productb').slideDown("slow"); }); So, if I change the user changes his/her mind between product a to product b, the options stay visible, and I'm not sure how to hide them again. Also, if the user already entered information in the fieldset's fields, should I reset them when I hide them? Any advice will be great. Thanks, Elle
[jQuery] clone() help
Hi, I'm new to jquery and went over quite a few tutorials -- some work great for me, with no problems at all. But I'm having trouble with the .clone() method. I am trying to build an order form, and have a button#add, which when clicked I want it to add another div.product-template (that includes a select list, options, quantity and add to cart button). So, my code says: http://pastie.caboo.se/189769 but... when I click on the button#add, once nothing happens, second time it adds the .product-template but any functions I had attached to the select list don't work. third click gets rid of my second .product- template. In my document I have: snip ... div#orderform form button#add fieldset#step1 div.product-template rest of options come here fieldset#step2 snip ... Would anyone know how to correct this? TIA, Elle
[jQuery] Re: ANNOUNCE: jqUploader plugin upgraded to v1.0
nice and why you like purple? hihi~ r u a girl or a boy?