[jQuery] Help with selectors and :not()

2009-03-08 Thread Yansky
Hi, I'm trying to get all table rows on a page that have an id that starts with the letter "r", but not any table rows that have id's which contain the word "review". I've tried to use the :not() method, but I don't think I'm using it correctly as it doesn't seem to be filtering out table rows t

[jQuery] Re: Is there a createElement equivalent in jQuery?

2008-12-03 Thread Yansky
document.body) >.attr('property',value) >.css({prop:val}) >.bind('click',fn); > > JK > -Original Message- > From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On > Behalf Of Yansky > Sent: Wednesday, December 03, 2008 9:2

[jQuery] Is there a createElement equivalent in jQuery?

2008-12-03 Thread Yansky
Hi, I was just wondering if there was a createElement equivalent in jQuery. e.g. var el = document.createElement('div'); I know I can create it with the inbuilt innerHTML way in jQuery - $(''); But I like to add event handlers to the element I've just created without having to traverse the dom

[jQuery] Re: Traversing AJAX Response?

2008-05-20 Thread Yansky
How exactly does $(response).find('#mylinks') work? How does it traverse the dom tree if the response is just a text version of the page's html? Nicolas R wrote: > > > If you convert your response to a jQuery object then yes. So something > like $(response).find('#mylinks') should work, if us

[jQuery] Re: getScript is great to add scripts dynamically, but how might you remove scripts?

2008-04-22 Thread Yansky
What would be the point? The script would have already loaded. cfdvlpr wrote: > > > Is it possible to remove a script from a page dynamically? > > -- View this message in context: http://www.nabble.com/getScript-is-great-to-add-scripts-dynamically%2C-but-how-might-you--remove-scripts--tp1

[jQuery] Re: Odd behaviour with the "one()" event handler

2008-04-21 Thread Yansky
But it's a button. I didn't think a click event handler worked for buttons? Scott González wrote: > > > Use click instead of mouseup, that's the event that triggers the > default behavior in browsers. > > > On Apr 20, 3:07 am, Yansky <[EMAIL PR

[jQuery] Re: Trouble with attr() and IE7, and onclick...

2008-04-21 Thread Yansky
Not sure if this'll do anything, but you should prolly use if(body === "") instead of if(body == "") because "comparisons against null, 0, true, false, or an empty string allowing implicit type conversion". vincehofmeister wrote: > > > Ok, So my code is running fine under FF2, no problems. Ho

[jQuery] Odd behaviour with the "one()" event handler

2008-04-20 Thread Yansky
I'm not sure if I'm misinterpreting how to use the "one()" event handler properly, but when I tried to use it in the bit of code below, I was unable to prevent the button from submitting the form (which it was now inserted into). I tried "return false" as well as an "event.preventDefault()", but c

[jQuery] Odd behaviour with the "one()" event handler

2008-04-20 Thread Yansky
I'm not sure if I'm misinterpreting how to use the "one()" event handler properly, but when I tried to use it in the bit of code below, I was unable to prevent the button from submitting the form (which it was now inserted into). I tried "return false" as well as an "event.preventDefault()", but

[jQuery] Re: Traversing AJAX Response?

2008-04-20 Thread Yansky
It's possible to traverse the AJAX response using selectors if the ajax response is in XML format. If it's just a string of html code, then you will have to use string methods to get the piece of html you're after. http://www.w3schools.com/jsref/jsref_obj_string.asp I usually do something like t

[jQuery] Re: Xpath and length() doesn't seem to work under IE7?

2008-03-06 Thread Yansky
Ah yes you're right. I got confused by the api page because it has () after length. http://remysharp.com/jquery-api/length On Mar 7, 4:59 am, Danny <[EMAIL PROTECTED]> wrote: > Isn't length a property, not a function (use $(...).length, not $ > (...).length() ) > >

[jQuery] Xpath and length() doesn't seem to work under IE7?

2008-03-06 Thread Yansky
This isn't a problem as such, just something I'm curious about. Under IE7 I've found that when I use xpath, the length() method doesn't seem to work, but size() does. E.g. $( '//[EMAIL PROTECTED] "indexL2"]//a').length(); doesn't seem to work, but $ ( '//[EMAIL PROTECTED] "indexL2"]//a').size()

[jQuery] Re: Updated API browser

2008-02-12 Thread Yansky
Thanks remy. :) On Feb 13, 3:25 am, "Alexandre Plennevaux" <[EMAIL PROTECTED]> wrote: > it's very neat! would be nice to turn it into an AIR applicaiton, that > runs on my desktop as an app available offline. > > another suggestion: provide a way to add comments a la php doc ? > Always found it s

[jQuery] Re: http://jquery.com/api/ page broken

2008-01-26 Thread Yansky
Hmm weird. I tried it in Opera on my machine and Firefox and IE7 on another machine and it didn't work with any of them. On Jan 27, 8:58 am, "Charles K. Clarkson" <[EMAIL PROTECTED]> wrote: > Yansky wrote: > > : Thehttp://jquery.com/api/page doesn't seem to be

[jQuery] http://jquery.com/api/ page broken

2008-01-26 Thread Yansky
The http://jquery.com/api/ page doesn't seem to be working for me. When I click on a link, nothing happens. I'm using Firefox on Windows XP.

[jQuery] Re: jquery xml help

2008-01-26 Thread Yansky
I'm not 100% sure what you're try to do, but here's what I might do: UI.dsAnchor = function(UI.item, UI.sortBy){ $.get("projects/datascapes.xml", function(xmlData){ return $(xmlData).find(UI.sortBy+'[title="' + UI.sortBy + '"]// item:contains("' + UI.item + '")'); }); } I have no i

[jQuery] Re: problem with .attr("alt");

2008-01-26 Thread Yansky
I think it's because children() returns an array, so you may have to use .children("img.text:first") or .children("img.text").eq(0) On Jan 26, 7:10 am, tsr <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying to create a dynamic rollover effect for a client, but I > just can't get my code to work, don

[jQuery] Using jQuery with Prism

2007-12-21 Thread Yansky
Just thought I'd mention that jQuery can be used with Prism. All you need to do is redeclare "document" as a local variable (which points to the browser) and you can then put jQuery inside the webapp.js file. :) e.g. function doStuff(document){ //put jQuery packed here $('body'

[jQuery] How to return data when calling an ajax function?

2007-12-10 Thread Yansky
Hi, if I have the following code: function xhr(sWT){ var dReturn; $.ajax({ type: "GET", url: sWT, error: function(errorData){ dReturn = errorData; }, success: function(succe

[jQuery] Re: Sorting links alphabetically with jQuery

2007-10-21 Thread Yansky
On Oct 19, 2:28 am, Yansky <[EMAIL PROTECTED]> wrote: > Hi, I'm having some problems figuring out how to sort links > alphabetically based on their text content and store the reference to > the link. I can do it sans jQuery, but I'd really like to be able to > use jQuer

[jQuery] Sorting links alphabetically with jQuery

2007-10-18 Thread Yansky
Hi, I'm having some problems figuring out how to sort links alphabetically based on their text content and store the reference to the link. I can do it sans jQuery, but I'd really like to be able to use jQuery to do it. This is what I want to do: http://yahoo.com";>Yahoo http://google.com";>Goo

[jQuery] Re: jquery code snippit improvement request

2007-10-18 Thread Yansky
It'll be more efficient if you store the elements you're going to manipulate into a variable. Also, since you're doing the same thing twice, you could make it into a function. e.g. $(document).ready(function() { var getTrs = $('tbody.bevker tr');

[jQuery] Re: jquery code snippit improvement request

2007-10-18 Thread Yansky
It'll be more efficient if you store the elements you're going to manipulate into a variable. Also, since you're doing the same thing twice, you could make it into a function. e.g. $(document).ready(function() { var getTrs = $('tbody.bevker tr');

[jQuery] Sorting links alphabetically with jQuery

2007-10-18 Thread Yansky
Hi, I'm having some problems figuring out how to sort links alphabetically based on their text content and hold the reference to the link. I can do it sans jQuery, but I'd really like to be able to use jQuery to do it. This is what I want to do with jQuery: http://yahoo.com";>Yahoo http://googl

[jQuery] Re: adressing relatively from $(this) - jquery beginner!

2007-06-29 Thread Yansky
If you just want to fade the divs out then try this: (assuming you want to keep the different classes you have for each div) $("a.mylink").click(function(){ $('.fo').fadeOut(); return false; }); On Jun 29, 1:20 am, thilothamm <[EMAIL PROTECTED]> wrote: > hi I was trying to adr

[jQuery] Quick question about jQuery & getElementsByName

2007-06-28 Thread Yansky
How would I use the document.getElementsByName() selector method in jQuery?

[jQuery] Re: How to Rotate an Image 90 Degrees

2007-06-28 Thread Yansky
You could do it with Canvas and a directX filter. Something like this: http://paste.css-standards.org/15230/view On Jun 27, 5:50 am, cfdvlpr <[EMAIL PROTECTED]> wrote: > Is there any plugin that will rotate an image 90 degrees? Something > tells me this is difficult if not impossible to do.

[jQuery] Fade background colour - my first attempt at a plugin.

2007-05-19 Thread Yansky
This is my first attempt at a plugin, so go easy on me. :) The plugin animates the background colour of an element. My code: http://pastebin.ca/raw/496686 I know there's already a feature in the interface plugin to animate the background colour of an element, but I wanted to have a go at writi

[jQuery] Re: BBCode Buttons with jQuery.

2007-05-18 Thread Yansky
I've pasted a different version here: http://rafb.net/p/H4REKv87.html I've removed all the excess stuff and added some comments. On May 19, 10:37 am, "Ruben S." <[EMAIL PROTECTED]> wrote: > Thak you for the answer Yansky, but i don't understand that code. &g

[jQuery] Re: BBCode Buttons with jQuery.

2007-05-18 Thread Yansky
I wrote a greasemonkey script that adds BBCode-ish buttons and a text box to a forum: http://userscripts.org/scripts/source/9061 It might give you some ideas as to how to implement it on your site. Here's a screenshot of what it looks like in action: http://img.photobucket.com/albums/v215/thegoo

[jQuery] What does jQuery return for 'null'?

2007-05-17 Thread Yansky
Hi, I was just curious as to what jQuery returns instead of 'null' when it can't find an element? e.g. if I wanted to run some code if a certain element was on the page, this doesn't return null: if ($('#categories') != null) { alert('foo'); } but getting out of the jQuery object does: if ($('#c

[jQuery] Re: any way to clear cached data

2007-05-13 Thread Yansky
Is this only happening in IE or in FF too? If it's just IE, you can try some of these workarounds: http://en.wikipedia.org/wiki/XMLHttpRequest#Known_problems On May 12, 7:09 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi, > > I noticed with the Jquery AJAX tabs, when the remote tab cont

[jQuery] Re: Need to attach .click() event to HTML anchor link but it won't stop bubbling...

2007-05-05 Thread Yansky
I was doing something similar recently. I'm not sure if this is the best/right way to do it, but I just added an "unbind" at the start of the function (before the click event handler is applied) to prevent bubling. e.g. function foo(){ $('a').unbind( "click" ); $('a').click(fun

[jQuery] Is it possible to chain this?

2007-04-29 Thread Yansky
Hi guys, I was wondering about the following code and if it's possible to chain it. At the moment it works fine as is, I'm just curious if it is possible. My original code: $('#greyLink').click(function(){ var getLink = $(this).prev().prev().attr("href"); return getLink.slice(getLink.indexOf("r=

[jQuery] Re: Specifying user agent with ajax

2007-04-22 Thread Yansky
nt to add the Mozilla/FF user agent string to the request. On Apr 23, 2:38 am, "" <[EMAIL PROTECTED]> wrote: > beforeSend:function(req){req.setRequestHeader > ("User-Agent","pokemon")}, > > inside a $.ajax call sets my user-agent to pok

[jQuery] Specifying user agent with ajax

2007-04-22 Thread Yansky
Hi, how do I go about specifying the user agent when I'm using ajax in jQuery? I've tried $.get("test.html", { data: 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv: 1.8.1.3) Gecko/20070309 Firefox/2.0.0.3' }, function(data){ $('#testDiv').append(data); } ); and $.get("tes

[jQuery] Re: change CSS

2007-04-18 Thread Yansky
http://www.kelvinluck.com/article/switch-stylesheets-with-jquery http://groups.google.com/group/jquery-en/browse_thread/thread/865172dd742c37dd/ On Apr 18, 10:57 pm, Ben Schwarz <[EMAIL PROTECTED]> wrote: > You may be able to create a link element and append it to the DOM, > although toying with

[jQuery] Re: AJAX problems in IE6

2007-04-18 Thread Yansky
Kinda hard to say if you don't show the code. ;-) Try using Firebug for IE to diagnose the problem. http://www.getfirebug.com/lite.html On Apr 18, 10:20 pm, withoutwax <[EMAIL PROTECTED]> wrote: > Hi all, > > I have a new site to be launched soon which relies on jquery to > provide funky AJAX fe

[jQuery] Re: Question about jQuery + CSS

2007-04-18 Thread Yansky
You could change stylesheets onmouseover. On Apr 18, 4:28 pm, "howard chen" <[EMAIL PROTECTED]> wrote: > sorry, a:hover is just an example, what i want is to style pseudo > class, such as a:visited, a:active etc > > >>Try > >>jQuery("a").mouseover( function() { $(this).css("fontSize", > >>"20

[jQuery] Re: Question about jQuery + CSS

2007-04-17 Thread Yansky
Oh wait, disregard my previous attempt. It doesn't remove the css onmouseout. Try this instead: jQuery("a").hover(function(){ $(this).css("fontSize","20px"); },function(){ $(this).css("fontSize", ""); }); On Apr 18, 2:35 pm, "howard chen" <[EMAIL PROTECTED]> wrote: > hody > > 1. How to s

[jQuery] Re: Question about jQuery + CSS

2007-04-17 Thread Yansky
Try jQuery("a").mouseover( function() { $(this).css("fontSize", "20px"); } ); howard chen wrote: > hody > > 1. How to set the css in each() iteration? > > e.g. > > jQuery("a").each(function() { > // change css > > // do the rest > ) > > I don't want to use jQuery("a").css as it as imply

[jQuery] Re: Altering jQuery (packed) to work in greasemonkey

2007-04-17 Thread Yansky
Thanks a bunch. :) If you have the time, would you also be able to explain what needs to be altered in the packed version so I could alter them myself if I need too? On Apr 18, 10:25 am, "Sean Catchpole" <[EMAIL PROTECTED]> wrote: > Yansky, > > I was going to wait for t

[jQuery] Altering jQuery (packed) to work in greasemonkey

2007-04-17 Thread Yansky
I really like using jquery & greasemonkey together to make userscripts for sites and so far I've been using the method outlined here to insert jquery into a websites page. http://joanpiedra.com/jquery/greasemonkey/ But I would really like to include the packed version within the greasemonkey user

[jQuery] Re: Problems with jQuery, ajax & greasemonkey.

2007-04-15 Thread Yansky
Sorry disregard my previous post. It seems to be working now, even though I changed nothing! :D On Apr 15, 5:26 pm, "Yansky" <[EMAIL PROTECTED]> wrote: > I'm having some problems figuring out why this greasemonkey script I'm > writing for the webshots.com sit

[jQuery] Problems with jQuery, ajax & greasemonkey.

2007-04-15 Thread Yansky
I'm having some problems figuring out why this greasemonkey script I'm writing for the webshots.com site isn't working properly. http://pastebin.ca/raw/440726 The problem seems to be the ajax response isn't being assigned to the "data" variable. At least, I think that's where the problem is. Fire

[jQuery] Re: Crashing IE 6, help

2007-04-13 Thread Yansky
There's a lite version available for IE. http://www.getfirebug.com/lite.html I also use IE Developer Toolbar - http://www.microsoft.com/downloads/details.aspx?familyid=E59C3964-672D-4511-BB3E-2D5E1DB91038&displaylang=en & Debug Bar, which has a very handy javascript console & is free for personal

[jQuery] Re: Check to see if a style exists

2007-04-12 Thread Yansky
You can access all the the CSS rules with the "styleSheets" & "cssRules" DOM objects. Check these pages for good examples: http://developer.mozilla.org/en/docs/Gecko_DOM_Reference:Examples#Example_4:_Using_Stylesheets http://www.javascriptkit.com/dhtmltutors/externalcss2.shtml http://cross-browse

[jQuery] Re: jQuery's this - a (brief) explanation

2007-04-12 Thread Yansky
Great stuff Remy. I've had a lot of trouble myself figuring out when & how to use "this/$ (this)". On Apr 12, 7:05 pm, "Remy Sharp" <[EMAIL PROTECTED]> wrote: > Whilst learning jQuery, and whilst teaching other guys I work with, I > found I/they kept getting confused as to what 'this' meant. > >

[jQuery] Re: Problems with $.get and parsing the results

2007-04-11 Thread Yansky
Ah right, that was the problem exactly. It's working now. Cheers. :) On Apr 11, 11:55 pm, Scott Sauyet <[EMAIL PROTECTED]> wrote: > Yansky wrote: > > I'm having some trouble figuring out why this isn't working: > > > $(links).each(function(i){ > >

[jQuery] Re: Problems with $.get and parsing the results

2007-04-11 Thread Yansky
Sorry, I should clarify that the #media div which I want to append the new content to is not the #media div which I am retrieving, then slice()-ing. (I hope that makes sense :) On Apr 11, 11:27 pm, "Yansky" <[EMAIL PROTECTED]> wrote: > I'm having some trouble figuring ou

[jQuery] Problems with $.get and parsing the results

2007-04-11 Thread Yansky
I'm having some trouble figuring out why this isn't working: $(links).each(function(i){ $.get(i, function(data){ var trimmedToList = $(data.slice(data.indexOf('\'),data.indexOf('\'))).html(); $('#media').append(trimmedToList); }); }); It's supposed

[jQuery] Re: Is this a bug ?

2007-04-11 Thread Yansky
I had a play around with it and the only thing I could figure out is that the first tag is being stripped during the function you mentioned - $(a).html(ah); The only thing I can think of is that perhaps it is something to do with the way IE handles whitespace - http://www.w3schools.com/dom/dom_

[jQuery] Re: Best Method to (re)bind event handlers

2007-04-10 Thread Yansky
There might be some info in this tutorial that could help you: http://www.learningjquery.com/2006/09/sacrificial-lambda On Apr 10, 5:18 pm, Olaf Gleba <[EMAIL PROTECTED]> wrote: > Hi, > > the last two days i argue about how to handle (re)binding event > handlers in a most elegant and un-redundant

[jQuery] Re: Quick question about the ".each()" function

2007-04-06 Thread Yansky
t rather than the raw DOM so we can use the "text()" function. So why doesn't that translate to "get the text for each jquery object in the array"? On Apr 6, 6:39 pm, [EMAIL PROTECTED] wrote: > Because: > > On Apr 6, 7:58 am, "Yansky" <[E

[jQuery] Quick question about the ".each()" function

2007-04-05 Thread Yansky
Hi, I'm trying to get the text from an array of elements and return it as an array. I've used the following code, which seems to work fine: var theData = $('.wordbreakfield'); $.map(theData, function(i){ return i.childNodes[0].nodeValue; }); My question is, why can't I just do the following?

[jQuery] Re: Moving to Google Groups (Finally)

2007-04-04 Thread Yansky
Arrrgh - I'm an idiot. I only just realised there is a view by "Topic List" option in google groups. I was finding it very difficult to navigate with the the default "Topic summary" view. So in case anyone else doesn't realise, you can change the topic view from this http://img.photobucket.com/al

[jQuery] Re: Problem with show() and hide() in IE

2007-04-01 Thread Yansky
Try this: On Apr 2, 3:31 am, "debussy007" <[EMAIL PROTECTED]> wrote: > Hi, > > I have a website with header, menu, content. > > To change the content according to the menu clicked, > I use show() and hide() functions of jquery. > > In Mozilla I got everything working, > but in IE6, the height w

[jQuery] Re: Plugin Requests

2007-04-01 Thread Yansky
lt;[EMAIL PROTECTED]> wrote: > Hi Yansky, > > I believe that the extended .animate() method provided in Interface > can do this already, and a whole lot more. Unless, of course, I > misunderstood the effect you're describing. > > --Karl > _ > Karl S

[jQuery] Re: Plugin Requests

2007-04-01 Thread Yansky
I was thinking that a plugin that can fade text colour to the background colour might be a good idea. So a heading could look like it's fading in from the background and then fading out again. On Mar 22, 2:54 pm, "Sean Catchpole" <[EMAIL PROTECTED]> wrote: > Post yourpluginrequests. > > There is