Actually, I am calling it all from the parent. You can see it at
youngisrael-stl.org ; look at the wood-grain calendar (in Hebrew) on the
right. You don't have to be able to read it, but on a slow computer you can
see it come up with scroll bars then re-adjust the size. '.load()' doesn't
fire in I
---But-need-help%3A-%22Object-doesn%27t-support-this-property-or-method%22-tf3413795.html";>see
> here ). Same result though, can't get it to work in IE and I get the same
> error: "Object doesn't support this property or method".
>
&g
We had a very similar discussion on a thread last week:
http://www.nabble.com/How-to-convert-%22class%22-to-%22style%3D%27attrs-...%27%22-tf3409582.html
The code you want would be similar to:
function isStyled(className){
var re = new RegExp('(^|,)\\s*\\.'+className+'\\s*(\\,|$)');
var ret =
What I've had to do is:
$('iframe.autoheight')
.each(function(){this.style.height=(this.contentWindow.document.body.scrollHeight+40)+'px';})
.load(function(){this.style.height=(this.contentWindow.document.body.scrollHeight+40)+'px';});
in my $(function()... code
It seems that IE loads the if
Oops...too tired when I wrote that. Make it
if ((new RegExp('[^ ,]'+selector+'[$ ,]').test(this.selectorText)))
but I haven't tested that either
Danny Wachsstock wrote:
>
> Brilliant minds think alike :) The RegExp allows for stylesheets that use
> a comma,
thumblewend wrote:
>
> On 16/03/2007, at 10:01 AM, Danny Wachsstock wrote:
>> function styleString(selector){
>> var style = "";
>> $.each (document.styleSheets, function(){
>> $.each (this.cssRules || this.rules, function(
My version (more jQuery-ish). It uses a very simple test for the selector
(this.selectorText == selector) but you could use a fancier RegExp-based
version if you wanted. It works in FF and IE. It does not deal with
differing media and @import rules.
function styleString(selector){
var style = "
I made a news scroller a while back; you can see it at
http://youngisrael-stl.org/updates.php
at the upper right. It smoothly scrolls any element (I use H3 and LI, but
you can specify), stops on mouseover and adds buttons to scroll back up or
further down, and a button to expand the whole list.
It
Using innerHTML (like $('') is faster than DOM creation methods;
see http://www.quirksmode.org/dom/innerhtml.html
but for complicated trees it's harder to understand and debug.
nrwsteff wrote:
>
> short question:
>
> what is the recommanded/better/fastest (memory footprint/execution time)
> jQ
toUpperCase();});
return elem.style[prop] || elem.style.getPropertyValue &&
elem.style.getPropertyValue(prop) || $(elem.selectorText).css(prop);
}else{
return $._curCSS(elem, prop, force)
}
};
$._css = $.css;
$.css = function (e,p){
if (e.selectorText) return $.curC
TML, things may not work.
The reverse would beL
function html_entity_encode(string) {return $('').text(string).html()}
Hope this helps
Danny Wachsstock
Mark-235 wrote:
>
> no that`s not the best way.. can`t i assign a php function to javascript
> and
> use it th
That works for Firefox, which treats the cssText as a textNode but fails in
Internet Explorer.
Yansky wrote:
>
> You could also do $("style").html("p{color:green;}"); if you wanted a
> non-inline style rule applied to the page.
>
>
> Danny Wachsstoc
This may be helpful to someone: I made a jQuery extension that lets you
change the stylesheet styles, rather than the inline styles (which is what
jQuery generally does). So you can do:
$.style('p').css('color','green');
creates a stylesheet with a rule that sets the color of P elements,
includi
This may be hijacking the thread, so I'll keep it brief. i agree that
innerHTML is useful, and it is a de-facto standard (like AJAX). I also agree
that whatwg's work is much closer to reality than w3g's, and like I said,
I'm not a fanatic standardista. My point is that it's harder to debug
complic
One thing to remember is that selectors are applied in order.
$('td:nth(3):positive') gives you the positive numbers that are in the
fourth cell,
$('td:positive:nth(3)') gives you the fourth positive cell, probably not
what you want
Danny Wachsstock wrote:
>
> To sel
To select specific elements, the cool kids all use custom selectors (not very
well documented, but see
http://docs.jquery.com/Plugins/Authoring#Using_jQuery.extend_to_extend_jQuery_itself
and
http://www.softwareunity.com/sandbox/JQueryMoreSelectors/ )
Basically, extend jQuery.expr[':'] with a str
Wow. I leave my computer for 24 hours and I get answers from John Resig,
Yehuda Katz and Mike Alsup. I love the jQuery community (and jQuery itself,
of course).
Mike:
Yes, adding to an empty array then jQuery'ing it would work; it's how I
originally structured my code. Adding to a jQuery better
Yes, $('nonexistent-selector') works, but seems very inelegant. I think $([])
is the best solution, but I'd like to hear from the gurus. How much code
depends on $() referring to document?
Sam Collett wrote:
>
> On 16/02/07, Danny Wachsstock <[EMAIL PROTECTED]> w
I've been using jQuery for a few months now, trying to convert all my
hand-rolled javascript and came across a minor problem that I could not find
documented anywhere:
I want to create DOM elements and add them into a jQuery object, as in;
var result = [empty jQuery object];
$.each(...
var elem
I'd like to see a graphics plugin--porting Walter Zorn's wz_jsgraphics would
be great.
http://www.walterzorn.com/jsgraphics/jsgraphics_e.htm
Danny
John Resig wrote:
>
> Hey Everyone -
>
> Google's Summer of Code has just opened up for 2007, and I'd love to
> have jQuery be a part of it:
> htt
ed so it looks
> messy until the hide function kicks in to hide the detail rows.
>
> i m really not sure how to proceed with this.
>
>
> Danny Wachsstock wrote:
>>
>> Try creating the element then using chaining to manipulate it:
>>
>> $("> clas
Try creating the element then using chaining to manipulate it:
$("").insertAfter(this).load(...).toggle();
But are you sure this is what you want? You'll end up creating a new row
each time it's clicked, not toggling
the old row. Why not create the (empty) description line when the table is
crea
oops. It should be
$(/#.+$/.exec(this.href)[0]);
Danny
Danny Wachsstock wrote:
>
> I'm looking at the HTML specs
> (http://www.w3.org/TR/1999/REC-html401-19991224/struct/links.html#edef-A)
> and hash doesn't look like a standard attribute. It seems to work for me
>
I'm looking at the HTML specs
(http://www.w3.org/TR/1999/REC-html401-19991224/struct/links.html#edef-A)
and hash doesn't look like a standard attribute. It seems to work for me in
both IE and FF, but if it's not in the standard, your browser may not
support it. You may be stuck with using the regu
24 matches
Mail list logo