[jQuery] How to detect jQuery version?

2009-02-05 Thread Geuis
Wondering what an easy way to detect which version of jQuery is running on a page. Is there a $.version property? Doing feature detection based on deprecated methods probably wouldn't work well, since they would still exist in some newer versions.

[jQuery] test for css selector capability?

2009-02-08 Thread Geuis
I'm working on a project where I need to detect if the browser natively supports a given CSS selector. For example, if I am using the selector 'ul li:first-child', this is supported by IE7, FF, and Safari but not by IE6 and below. Is there a way that I can test that selector to see if the current

[jQuery] Re: Passing a Index to a function

2009-02-08 Thread Geuis
$("table tr").click(function() { clickFunc($('table tr').index(this); }); On Feb 8, 10:54 pm, Pedram wrote: > Dear folk, > I want to get the index of the TR and send it to the Function , I > don't know how to it . this is what I'm trying to do > > $("table tr").bind("click",{IndexName:

[jQuery] Re: How to make hyperlink failed

2009-02-08 Thread Geuis
I think you're asking, how do you prevent a link from doing anything when the browser has javascript enabled. $('#xxx').click(function(){ //your stuff return false; } On Feb 8, 11:22 pm, "David .Wu" wrote: > If I got a hyperlink http://xxx.com"; id="xxx">xxx > > $(function() { >         $('#xxx

[jQuery] Re: test for css selector capability?

2009-02-09 Thread Geuis
return the version of browser , then u have use below function > > $.browser.version it will return version of current browser according to ur > > problem ie6 u can add css on the fly. > > > hope this will work . > > > cheers & cioa > > > On Mon, Feb 9, 2

[jQuery] Re: test for css selector capability?

2009-02-09 Thread Geuis
return the version of browser , then u have use below function > > $.browser.version it will return version of current browser according to ur > > problem ie6 u can add css on the fly. > > > hope this will work . > > > cheers & cioa > > > On Mon, Feb 9, 2

[jQuery] Re: test for css selector capability?

2009-02-09 Thread Geuis
n, and pretty sure it doesn't work > > ul > li { >      color: blue; > > } > > but part of the magic of jQuery (and other libraries) is that it takes > that into account already. and saying $("ul > li") should work no > matter what (supported) browser it run

[jQuery] Re: test for css selector capability?

2009-02-09 Thread Geuis
the element to > see if it matches the colour in the stylesheet. > > Slightly tricky but doable. > > Karl Rudd > > On Tue, Feb 10, 2009 at 10:31 AM,Geuis wrote: > > > I guess this really is a hard concept to get across after all. > > > Ok, so there's browser featu

[jQuery] wrap isn't working, or I'm doing it wrong?

2008-10-26 Thread Geuis
There's a page of some damn tables that I'm trying to redo dynamically. Its a page I don't have control over so this code is running from a bookmarklet in my browser. I'm trying to sample out the content I want and re-wrap it in an an unordered list. I can't get the .wrap function to work. The sa

[jQuery] How to determine filter used to select $(this)?

2008-11-04 Thread Geuis
If I do a match that is using multiple selectors, how(or is it possible) do I know which filter was used to select the item in the current index? For example: $('*[onabort],*[onblur],*[onchange]').each(function(){ $(this).css('border','1px solid #000'); }); This scans the DOM for any eleme

[jQuery] Re: pure CSS hover problem

2008-11-04 Thread Geuis
Ernes, can you post your html and CSS? Feel free to email me directly if you want. [EMAIL PROTECTED] On Nov 4, 8:22 am, "Enes Fazli" <[EMAIL PROTECTED]> wrote: > Hello everybody, > > I have a menu that is similar to the fourth example > onhttp://users.tpg.com.au/j_birch/plugins/superfish/. The p

[jQuery] How to get complete event object model for a page?

2008-11-06 Thread Geuis
Sorry if the subject doesn't quite describe what I'm after. Hopefully the description works better. Ok, so is there a way to find out all of the events and functions that have been bound to elements in a page? For example, if you did , or if you did document.body.addEventListener('load',func(),fa

[jQuery] Re: jQuery + HTML namespaces

2008-11-06 Thread Geuis
I have absolutely no idea if this will help with your problem, but check out http://docs.jquery.com/Core/jQuery.noConflict On Nov 6, 2:58 pm, ken <[EMAIL PROTECTED]> wrote: > I've found several instances of people having trouble using jQuery with a > document that implements custom HTML namespa

[jQuery] Re: Help with jQuery Suckerfish 2-tier navigation

2008-11-06 Thread Geuis
Don't use a strict javascript approach to building suckerfish menus. Use CSS, and only add javascript to support hover on non-anchor elements in IE6. Use the Son of Suckerfish page for the basics. http://www.htmldog.com/articles/suckerfish/dropdowns/ Here is a complete working example: http://

[jQuery] need some basic json object help

2008-11-16 Thread Geuis
I've gotten to be fairly intermediate at consuming json objects, such as those I'm retrieving from web api's. However, I'm trying to push the boundaries of what I understand about JSON objects once the client has loaded them. I have been searching around google for the last couple of hours for wha

[jQuery] Re: need some basic json object help

2008-11-16 Thread Geuis
Thanks for the tips. That helps a bunch. On Nov 16, 6:27 pm, RobG <[EMAIL PROTECTED]> wrote: > On Nov 17, 8:57 am, Geuis <[EMAIL PROTECTED]> wrote: > > > > > I've gotten to be fairly intermediate at consuming json objects, such > > as those I'm ret

[jQuery] Possible to use a non ID selector in .load()?

2008-11-17 Thread Geuis
I'm loading a full page using .load() and trying to use a selector to only get part of the page, however it doesn't seem to be working. Is it necessary that the selector always start with an id? My code: $('#mydiv').load('/path/index.php body>center>table>tbody>tr:eq(2) >td>table>tbody>t

[jQuery] detect when content of element changes?

2008-12-11 Thread Geuis
On the site I'm working on, we have some span tags with IDs. The spans are initially rendered on the page with no text content. When certain events happen, text error messages are loaded into these spans. I want to write an additional handler that is triggered when the text content of the span is

[jQuery] how to detect node removal in IE?

2008-12-12 Thread Geuis
I'm working on a plugin that extends the change event to detect when non-input elements are modified. For example, when a span tag has new content added/changed/removed. I've got some of the basic behaviors working well using DOM Mutation events in FF, Safari, and Chrome. IE 6/7 is being its typi

[jQuery] Re: JQuery is really a nice tool

2008-12-12 Thread Geuis
Ok, there's no freaking jquery on that page. More so, the html of the page is absolutely HORRIBLE. Right-click disabled. Html above the doctype. No closing body or html tags. On Dec 12, 10:30 am, Sid wrote: > Just look at this URLhttp://googlelance.com > > You see the login and button click on i

[jQuery] hyphen breaking "starts with" selector

2009-01-05 Thread Geuis
I'm wondering if this is a bug or if I'm missing something. The selector $('span[class^="err"]') matches but *not* . $('span[class^="err-"]') does *not* match or What's the deal with the hyphen? Is it a special character?

[jQuery] Thank you John Resig

2009-04-03 Thread Geuis
I just want to say, thank you John. I have been developing sites with jQuery for the better part of a year and it has just made the amount of work I can get done sky rocket. Now, however, I just started a new job this week and they are using YUI. I have been patient and have spent the better part

[jQuery] How dynamically create iframe and add/remove data from it

2008-08-23 Thread Geuis
Hi folks, hoping for some knowledgeable assistance with this problem. What I'm doing is dynamically creating an iframe in the DOM, then trying to write some data into it. That's the part I'm stuck at. I *am* able to create the iframe, no problem. I have a div with the id #container built into th

[jQuery] Why is getElementById different from $('testid')?

2008-09-18 Thread Geuis
So I have this code to write a content to an iframe which works just fine. I'm trying to rewrite it using Jquery though. var f=document.getElementById('testiframe'); var doc = f.contentWindow ? f.contentWindow.document : f.contentDocument ? f.contentDocument : f.document;

[jQuery] need help in making dynamic form validation

2008-09-26 Thread Geuis
Hi everyone, I'm hoping someone can help me learn the right way to do this. Its experimental for me at this point. Example code is at the bottom. So what I'm attempting to do is to do input form validation by loading a function which self-assembles an object that has its properties set as the ID

[jQuery] Re: Bind events on DOM elements inserted from other frame

2008-09-26 Thread Geuis
I keep seeing people talking about different ways to access the document of an iframe. This method(after much hairpulling and testing) works very well. $('iframeID').contents() The .contents() method will automatically handle the browser differences between contentWindow and contentDocument. It