Advice: more specific subject lines than the ultra vague and useless
"question" will get you better and faster help
On Dec 23, 6:10 am, "Dirceu Barquette"
wrote:
> Hi,
>
> Has anybody a solution?
>
> showing a few jQuery methods :
> var Typeof = {};
> for (v in $) {
> Typeof = typeof $[v]
P.S.; forgive some extraneous code and comments. Copied and revised
quickly for this post.
On Dec 17, 11:02 am, taykahike wrote:
> Hello,
>
> Can anyone tell me if it's possible to have multiple triggers in
> nested lists using the jQuery UI Accordion? Also, is it configurable
> to open the acco
Take a look at this:
http://docs.jquery.com/Frequently_Asked_Questions#Why_doesn.27t_an_event_work_on_a_new_element_I.27ve_created.3F
That contains a short answer to your question:
"Events are bound only to elements that exist when you issue the jQuery
call. When you create a new element, you mu
Thank you for your reply Ariel, actually I found the bug. From the
trigger, I am calling 3 javascript function and when the page was
loading, there's an element who was undefined, therefore it was
creating a javascript error that was stopping the good execution of
the trigger function. This quick
You can probably use one of these plugins (or both combined).
http://flesler.blogspot.com/2007/10/jquerylocalscroll-10.html
http://flesler.blogspot.com/2008/02/jqueryserialscroll.html
The first one should do, but you can apply the 2nd for prev/next
navigation.
--
Ariel Flesler
http://flesler.bl
Hi Elke,
The dropShadow plugin wasn't used for this. It was accomplished with
images and css. If you download Firefox 3 and install the excellent
firebug extension (http://www.getfirebug.com) it allows you to inspect
the HTML page and see what CSS styles were applied to what elements.
Ha
You are not really taking advantage of jQuery.. and document.write()
calls that are not present on page load will always clear the page.
You can simply do:
$(document).ready(function(){
//$('#jt').after(''); //insert the script, but this would clear the page too
$('#jt').after('I am her
Just to be clearer, you can't use document.write() after the page is
already loaded.
- ricardo
On Oct 18, 3:09 pm, jt <[EMAIL PROTECTED]> wrote:
> I'd like to load a js file into a specific location but it replaces
> the page with what is being written out. I suspect there's a fairly
> obvious a
Excellent,
Both solutions worked great!
Thanks a lot for your help
On Oct 16, 3:26 pm, adexcube <[EMAIL PROTECTED]> wrote:
> Hi, have you tried something like this?
>
> $("input:text").focus( function() { alert($
> (this).attr("name")); } ).autocomplete("server.php", {
> e
No need to apologize of course :)
On 16 Okt., 16:22, GARIL <[EMAIL PROTECTED]> wrote:
> Excellent! Thank you both. And I apologize. I hit the button
> too quickly.
Yeah, otherwise the radio and checkbox controls would be rather
useless.
--Klaus
On 17 Okt., 06:27, Karl Swedberg <[EMAIL PROTECTED]> wrote:
> On Oct 16, 2008, at 2:06 PM, ricardobeat wrote:
>
>
>
> > on a side note, name attributes should be unique (just like IDs), they
> > are identifiers fo
Hi.
Sorry for the late reply.
Am 16.10.2008 um 02:33 schrieb Mike Alsup:
I ask because i get different results while traversing some Nodes
with
DOM Style and jquery approach.
How are the results different?
I have to revoke my question ;) It was a mistake by myself ;-)
While the DOM Func
On Oct 16, 2008, at 2:06 PM, ricardobeat wrote:
on a side note, name attributes should be unique (just like IDs), they
are identifiers for an element. If you want valid HTML/XHTML you
should use a class instead.
- ricardo
this is not necessarily true.
name attributes must be unique when the
on a side note, name attributes should be unique (just like IDs), they
are identifiers for an element. If you want valid HTML/XHTML you
should use a class instead.
- ricardo
On Oct 16, 11:22 am, GARIL <[EMAIL PROTECTED]> wrote:
> Excellent! Thank you both. And I apologize. I hit the button
>
Hi, have you tried something like this?
$("input:text").focus( function() { alert($
(this).attr("name")); } ).autocomplete("server.php", {
extraParams: {
fieldname: function() { return $(this).attr("name"); }
}
Have you tried this?
$("input:text").focus( function() { alert($
(this).attr("name")); } ).autocomplete("server.php", {
extraParams: {
fieldname: function() { return $(this).attr("name"); }
}
});
It assign the autocomplete function
Right from the docs
http://docs.jquery.com/Frequently_Asked_Questions#How_do_I_check.2Funcheck_an_input.3F
$("input[name='veggies']").attr("checked", "checked");
On Oct 16, 9:25 am, GARIL <[EMAIL PROTECTED]> wrote:
> I used $(":checkbox").each(function()
> {this.checked=this.name=="veggie
Excellent! Thank you both. And I apologize. I hit the button
too quickly.
This may not be the most elegant solution, and is untested since it's
just off the top of my head, but i wouldn't see why it wouldn't at
least "work", heh
var _CurrentFieldName;
$(document).ready(function() {
$(".autocomlete")
.focus(function() { _CurrentFieldName = $
(thi
$('input[name=veggies]').attr('checked', true);
By the way: putting the question into the subject instead of
"question" will probably increase chances of your mail being read.
--Klaus
On 16 Okt., 15:25, GARIL <[EMAIL PROTECTED]> wrote:
> I used $(":checkbox").each(function()
> {this.chec
I used $(":checkbox").each(function()
{this.checked=this.name=="veggies"}) but I'm wondering if there's
another way, like using filter perhaps?
On Oct 16, 8:06 am, GARIL <[EMAIL PROTECTED]> wrote:
> Using jQuery, is there a quick way of setting the 'checked' attribute
> to true for all the
> Does the jquery parent() traversing the same as the DOM 'parentNode' ?
Yes.
> I ask because i get different results while traversing some Nodes with
> DOM Style and jquery approach.
How are the results different?
Igor Spasic wrote:
Hellooo -
Excellent plugin! Gem.
would you be so kind to let me know what is the best practice for
following situation:
I have a part of page that is loaded using ajax. Page contains lot of links.
Each link needs to become a trigger for specific dialog.
I do have onPageLoa
sarah palin http://www.gpirate.com/search?q=sarah+palin
On Sat, Sep 6, 2008 at 11:32 AM, Ca-Phun Ung <[EMAIL PROTECTED]> wrote:
>
> nabrown78 wrote:
> > Thanks Ca-Phun Ung, I tried your suggestion, as you're quite right the
> > apostrophe I was using before was the wrong one. But no luck! I tried
Well, this proved an intractable problem - something relating to
encoding that was over my head. I found a work-around though, using
filter to find the list items containing "ladies" and "short-sleeve"
thus leaving out the darn apostrophe altogether:
$("li:contains(ladies)
nabrown78 wrote:
> Thanks Ca-Phun Ung, I tried your suggestion, as you're quite right the
> apostrophe I was using before was the wrong one. But no luck! I tried
> this:
> $("li:contains(ladies’ short-sleeve
> tee)").addClass("selected");
>
>
You need to wrap the text str
Thanks Ca-Phun Ung, I tried your suggestion, as you're quite right the
apostrophe I was using before was the wrong one. But no luck! I tried
this:
$("li:contains(ladies’ short-sleeve
tee)").addClass("selected");
If I change the source to just "ladies' short-sleeve tee" an
nabrown78 wrote:
> I am trying to select a list element that contains the text
> "ladies’ short-sleeve tee". I have tried
>
> $("li:contains(ladies' short-sleeve tee)").addClass("selected");
> $("li:contains('ladies\' short-sleeve tee')").addClass("selected");
> $("li:contains(ladies’ short-sleeve
is it me or they have z-index issue in IE7 ?
On Sep 1, 4:56 pm, "Joel Birch" <[EMAIL PROTECTED]> wrote:
> That's all correct about IE. In this case however, it seems like the
> reason for the if/else is for the benefit of Mac Firefox 2. In that
> browser, the weight of the text appears to alter
You can't have a table inside of a paragraph - the paragraph is
automatically closed when the table tag starts!
Until you know html inside out, always run your documents through a
html validator would be my tip. :-)
On 1 Sep, 23:03, jjsanders <[EMAIL PROTECTED]> wrote:
> Hello everyone,
>
> I w
That's all correct about IE. In this case however, it seems like the
reason for the if/else is for the benefit of Mac Firefox 2. In that
browser, the weight of the text appears to alter suddenly whenever
it's opacity shifts between 0 and 0.0001, and also between 0. and
1. The else block emulat
I know that IE (6 and 7) both have issues with opacity with regards to
content inside the opacity-changing container. If the content has bold
text (IE6 and 7) or transparent PNG images there can be display issues
- the font is rendered without it's anti-aliasing (eg. cleartype) and
the image is re
> I'm new to the group and to JQuery, but am currently reading and
> writing a review of JQuery in Action. I have an interesting problem;
> I'm hoping someone can help me with it.
>
> I have a form that posts to a server. When the post executes, it
> always receives a redirect. What I want to do i
Hi Mike,
Thank you very very much for the much detailed explanation. I went over it
and actually got my quicksearch to work! :)
If there is anything I can do next time, please don't hesitate to ask.
All the best,
McBilly
On Sat, Aug 23, 2008 at 9:34 PM, mickes <[EMAIL PROTECTED]> wrote:
>
> Tr
Try this:
Here is a sample of the section of my html document:
ASAP Summries 2-26-08 - Flight Options
$(document).ready(function () {
$('table#my_id_of_the_table tbody
TR').quicksearch({
thank you very much, all of you! :)
Now I got it, I really appreciate your help.
andrea
On Aug 19, 6:34 pm, andrea varnier <[EMAIL PROTECTED]> wrote:
> Hi :)
> in your plugins (I'm studying from the best here :))) I often find
> variable assignments like this:
>
> options = $.extend({
> url: this.attr('action') || window.location.toString(),
> type: this.attr('
Hi Andrea,
it's really a matter of true or false. The attr() method returns a
string and so if it returns an empty one, it's evaluated as false and
the part after the "||" operator is then taken. You use jQuery wrapper
on both sides of the "||" operator and jQuery wrapper always returns
something
The problem here is that neither of your expressions can EVER evaluate
to false. Even if no actual DOM element is selected, you still get an
empty (jQuery)array.
On Aug 19, 4:34 am, andrea varnier <[EMAIL PROTECTED]> wrote:
> Hi :)
> in your plugins (I'm studying from the best here :))) I often f
$('.left_selected') returns always true, because if there's not a
matching element, $('.left_selected') is an array (not null) with
length = 0.
hth,
Nicola
On Tue, Aug 19, 2008 at 10:34 AM, andrea varnier
<[EMAIL PROTECTED]> wrote:
>
> Hi :)
> in your plugins (I'm studying from the best here :
You could combine the accordionchange event with the scrollTo plugin.
That event is documented here, though currently down, it seems:
http://docs.jquery.com/UI/Accordion/accordion
Jörn
On Wed, Jul 9, 2008 at 5:51 PM, Frank <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I've a question about accordion.
> Here is what is throwing you off: When you take a reference
> to a function such as the "t.display" in your method A,
> you're not getting a "bound method", but a simple reference
> to the function itself.
By way of contrast, in Python you would get a bound method like your code is
expecting
Here is what is throwing you off: When you take a reference to a function
such as the "t.display" in your method A, you're not getting a "bound
method", but a simple reference to the function itself.
IOW, when "t.display" is called later, it won't be called a method of the
"t" object (as it would
Hi,
Method B & C work, because you call the function and don't pass it to
blur().
Regards,
Markus
On 30 Jun., 20:18, Oltmans <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I'm stuck in a situation where I need help. Any help will be highly
> appreciated. I've created an object, after creating the obj
No guarantees, but this might work (using code from
http://www.hedgerwow.com/360/dhtml/ie6_memory_leak_fix/):
http://pastie.org/private/rarlluuasfvmmtqkgvca
On Jun 30, 12:18 pm, Oltmans <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I'm stuck in a situation where I need help. Any help will be highly
>
You're not loosing anything by modulizing. All event definitions will
still be included in your code (if you put them all in one js file, of
course). Only difference is that they are not all evaluated, just ones
you need. Win-win. Only thing you will loose is half an hour to put
things right.
On
Thanks everyone for your input. My other concern is that if i
completely modularize code to seperate includes, then i will lose the
one-time download / precaching benefit of a single js download.
Perhaps the best approach is to make sure that unnecessary event
handlers arent attached using someth
It actually does have a performance impact, even though we can't
always "see it" on modern processors and javascript engines for
desktop browsers. If you consider users with handheld devices that
have functionality similar to PCs (and even take media="screen"
instead of media="handheld" for stylin
While I can't answer your question, if no else can, here's a method I
use when building a website:
I give each page a unique ID on the element. This is generated
by a PHP script, but you could do it manually as well. Then I use a
switch statement in my main JavaScript file, testing for $
('body'
Thank you so much, Karl. By the way on jQuery Doc, it said we may use
negative integer for starting from the last. But it seems didn't work.
Sorry about double post.
Jack
On Jun 25, 12:27 pm, jack <[EMAIL PROTECTED]> wrote:
> Just a beginner's question. I found slice(start, end) seems doesn't
> pick up that the last one specified by 'end'. Such as slice(0, 3), it
> picks up 0, 1 and 2. Is that correct?
You might want to check the ECMAScript specification:
15.4.4.
Check this, works exactly the same:
http://snipurl.com/2ofp4
Cheers
--
Ariel Flesler
http://flesler.blogspot.com/
On 24 jun, 23:27, jack <[EMAIL PROTECTED]> wrote:
> Just a beginner's question. I found slice(start, end) seems doesn't
> pick up that the last one specified by 'end'. Such as slice
Correct, this is as intended. http://docs.jquery.com/Traversing/slice
As noted in the docs, it behaves like the "native" JavaScript
Array.slice function.
"It extracts up to, but not including, the 'end' element (if no 'end' is
specified, the default is the very last element)."
- from
Hi, Ariel: Thank you very much for your response.. the website was a
little delay in my office PC, so I did not find your post
earlier:-) :-)
lihao
On Jun 11, 5:46 pm, Ariel Flesler <[EMAIL PROTECTED]> wrote:
> $('select[name=test]').change(function(){
>window.open( this.value );
>
> });
>
>
Never mind, I've found the solution
window.open($(this).val());
lihao
On Jun 11, 1:35 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Hi, folks:
>
> I am trying to use select/option to open a new window and whenever I
> click an item from the selection dropdown list... for example,
$('select[name=test]').change(function(){
window.open( this.value );
});
http://www.quirksmode.org/js/popup.html
--
Ariel Flesler
http://flesler.blogspot.com/
On 11 jun, 14:35, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Hi, folks:
>
> I am trying to use select/option to open a new wind
There is a event triggered for invalid forms, see
http://docs.jquery.com/Plugins/Validation/validate#options
A usage example is here:
http://jquery.bassistance.de/validate/demo/marketo/mktSignup.js
$("form").bind("invalid-form.validate", function(e, validator) {
var error
If your working with two panels that have the class UserSubPanel then this
should do the trick. Remove the id.
$('div.UserSubPanel a').addClass('sideLink');
http://2whoa.com/dominate/
vladv <[EMAIL PROTECTED]> wrote:
Thanks.
I'll try it, but I'
Thanks.
I'll try it, but I'm not sure how does that make any difference...
What if I want to have two panels with the same css class and work
with them both? I think I should be able to do that with jQuery.
That is all the point, doesn't it?
Thanks again.
Vlad
On Apr 24, 4:45 pm, ripple <[EMAIL
You have UserSubPanel as the id.
But you call it as a class.
$('div.UserSubPanel a').addClass('sideLink');
Call it by the id.
$('#UserSubPanel a').addClass('sideLink');
http://2whoa.com/dominate/
vladv <[EMAIL PROTECTED]
The panel is asp.net Panel but if I look at generated html this is
what I see:
User Panel
Link1
Link2
$(document).ready(function(){
$('div.UserSubPanel a').addClass('sideLink');
Hi
does this UserSubPanel is a gernal div like
div id="UserSubPanel"
or an asp.net div like
div id="UserSubPanel" runat="server"
if the second is the case than your div cannot be found because
aps.netrwrites the id to something like
wrote:
>
> Could you post the html? That would help a lot
Could you post the html? That would help a lot. If the links exist
your code should work.
btw, ripple, you shouldn't need to use 'each' - addClass will apply to
all objects in the collection. Using 'each' just adds overhead.
On Apr 24, 3:14 am, ripple <[EMAIL PROTECTED]> wrote:
> Why not loop th
In a very few instances I can see how livequery could help. But I see very few
reason's for it.
Why add another plugin include to a page which for livequery is 36.91 kb? You
could just easily right a small function or a few lines of code to handle the
new objects that are added from js aft
Are the links being added after the fact?
Maybe post the page so we can see. It's probably something simple. You
might need the LivejQuery plugin. That is used for when objects are added
via JS after the page loads.
Glen
On Wed, Apr 23, 2008 at 8:14 AM, ripple <[EMAIL PROTECTED]> wrote:
> Why
Why not loop through it? This is usually how I would do it.
$(document).ready(function(){
$('#UserSubPanel a').each(function(i) {
$(this).addClass('sideLink');
});
http://2whoa.com/dominate/
vladv <[EMAIL PROTECTED]> wrote:
Thanks f
Thanks for your answer :)
I tried this also, but no luck...
What may be the problem?
I have another jQuery function in the same place, but it works just
fine
can it be that nested div called in other way?
Thanks again
On Apr 23, 3:26 pm, "Giuliano Marcangelo"
<[EMAIL PROTECTED]> wrote:
> $
$(document).ready(function(){
$('#UserSubPanel a').addClass('sideLink');
});
2008/4/23 vladv <[EMAIL PROTECTED]>:
>
> Selecting all the links in div..
> I know it should be really simple, but for some reason I can't make it
> work..
>
> I work with asp.net and try to run something
Hi Rene,
I've never quite understood the benefits to the plugin approach, when
you can simply create an object that uses jquery.
(I've wondered about this before on the list, but so far no one has
enlightened me.)
function Animator(container) {
this.jC = container; // this is a jquery instan
jQuery itself doesn't have any issues with ie6. What does drive me
insane is that its css-based functions make several assumptions, which
you then have to go back & correct for ie6.
I've started creating 'iespecial.css' for jQuery sites. Last time I
did anything like that, it was to accommodate v
Thanks for the quick reply Karl.
I am aware of scrollTop. When the onscroll event fires, I can read
scrollTop and determine how many pixels the browser has moved the
scroll bar, but I can't determine is how many pixels the browser will
move the scrollbar when the user hits arrow up/down. I need t
If you're talking about the browser scrollbars, I'm not sure how to
listen for someone clicking on them.
But if you can figure that part out, you can use the scrollTop
property of a DOM element before and after the click.
Note, while it works in FF and IE, I'm not sure what it does in Saf
-- Original Message --
To: Jquery-en (jquery-en@googlegroups.com)
From: Mika Tuupola ([EMAIL PROTECTED])
Subject: [jQuery] Re: question about $(document).ready
Date: 28/1/2008 13:40:49
On Jan 28, 2008, at 2:21 PM, Alexandre Plennevaux wrote:
> Am i correct to assume it me
On Jan 28, 2008, at 2:21 PM, Alexandre Plennevaux wrote:
Am i correct to assume it means that document.ready means the html
page is loaded, but not other files, such as its css, img and js
dependencies?
Yes. If you are doing preloading it is better to bind to window.load.
Otherwise prel
Hello, I think I found the necessary option: When I click in the topic
on "options" and there on "send updates to me" I think I'll get a mail
about new statements :)
On 31 Dez. 2007, 02:46, "Jeferson Koslowski" <[EMAIL PROTECTED]>
wrote:
> The mailing list itself does not provide this feature, bu
I just put a div above the input field with an id that
identifies it as the error message target...
The js validation code is set up like this:
$("#contact-form").validate({
errorPlacement: function(error, element) {
error.appendTo("#"
The mailing list itself does not provide this feature, but I think u can
acquire this creating a filter in ur mail client.
On Dec 22, 2007 2:48 PM, psy* <[EMAIL PROTECTED]> wrote:
>
> Hello,
> is it possible to receive only responds to questions that I asked in the
> mailinglist directly?
> thank
On Dec 30, 2007 4:33 PM, KnoxBaby <[EMAIL PROTECTED]> wrote:
>
> > > Hello,
> > > is it possible to receive only responds to questions that I asked in
> the
> > > mailinglist directly?
> > > thanks :)
>
That's not possible AFAIK. Either you subscribe, or you don't.
--
Jeroen
Unfortunately no. The mailing list replies go to everyone.
Rey
KnoxBaby wrote:
Sorry for bumping ... but I think there's somebody who knows it??
Thanks a lot!
On 23 Dez., 00:44, KnoxBaby <[EMAIL PROTECTED]> wrote:
I mean, I don't want to get only one mail a day or always, when
somebody write
Sorry for bumping ... but I think there's somebody who knows it??
Thanks a lot!
On 23 Dez., 00:44, KnoxBaby <[EMAIL PROTECTED]> wrote:
> I mean, I don't want to get only one mail a day or always, when
> somebody writes something but always, when somebody writes an answer
> to one of my "topics" :
I mean, I don't want to get only one mail a day or always, when
somebody writes something but always, when somebody writes an answer
to one of my "topics" :)
On 22 Dez., 17:48, psy* <[EMAIL PROTECTED]> wrote:
> Hello,
> is it possible to receive only responds to questions that I asked in the
> ma
Thank you for the message. I tried your suggestion and it didn't work.
I am thinking that the reason might be because of the way of Jquery to
evaluate the included Javascript in the repsonse page. When I am using
livequery plugin like
$('#categories').livequery(function(){$(this).tabs(2,
{remote
On 29 Nov., 05:54, cjiang <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am working on an application in which I use JQuery Tabs plugin. The
> basic layout of the page is that there is a tree structure on the left
> side of the page. When the user clicks on any node of the tree, it
> fires an Ajax call a
Thanks Karl, I've done this - hopefully I can get some feedback and
see if they've already addressed a fix for this and if it is even
possible.
Pax.
On Nov 23, 10:11 am, Karl Swedberg <[EMAIL PROTECTED]> wrote:
> On Nov 23, 2007, at 9:39 AM, Stosh wrote:
>
> > Perhaps I'm foolishly getting ahea
On Nov 23, 2007, at 9:39 AM, Stosh wrote:
Perhaps I'm foolishly getting ahead of myself here, but the while loop
around 1241 in find() seems to explain why this happens, is there any
way of modifying find() so that it searches comma separated selector
returning the results in DOM order? Or am
Jörn,
filter() appears to behave the same way that find() does, looping
through and stacking the results in order, not by appearance in the
DOM.
Pax,
- Stan
On Nov 23, 3:05 am, Jörn Zaefferer <[EMAIL PROTECTED]> wrote:
> Karl Swedberg schrieb:
>
> > Hi Stan,
>
> > this topic has come up once be
An observation I just noticed...
To do the following...
$(start).find('div.classOne, div.classTwo');
And have it order properly, with Karl's example it'd actually need to
be:
$(start).find('*').filter(function() {
return this.className.match(/classOne|classTwo/);
}) ;
I just noticed this
Thanks Karl. I did something similar in the end adding a new custom
selector prefixed with the ":", like:
"jQuery(a).is('.classOne') || jQuery(a).is('.classTwo')"
However, yours looks like it would execute faster and more
efficiently, so I'll probably switch to using that.
All aside though, is t
On Nov 23, 8:05 am, Jörn Zaefferer <[EMAIL PROTECTED]> wrote:
>
> How about this: $("div").filter(".one, .two")?
>
> Jörn
Nope, sorry.
That will (A) filter for '.one', then (B) filter for '.two', returning
the results of A appended by the results of B.
So...
...gets 5 results returned in BDAB
Karl Swedberg schrieb:
Hi Stan,
this topic has come up once before at least, and I can definitely
understand the confusion. The conciseness of the syntax in this case
perhaps leads to unexpected results. I'm not sure what the rationale
is, but using a filter function should give you the res
Hi Stan,
this topic has come up once before at least, and I can definitely
understand the confusion. The conciseness of the syntax in this case
perhaps leads to unexpected results. I'm not sure what the rationale
is, but using a filter function should give you the results in the
order yo
Uff I'm sorry, check the " ' " part... it should say: " ''
"... I'm sorry..
This is fixed, and I tested it in Firefox 2.0.0.7 and IE6, both
Windows. Make sure you put a valid image url instead of xyz.jpg.
$(function(){//make sure this happens after document ready.
$('').load(function(){
Hi,
This line:
$('body>.jScrollPaneContainer').css({'height': $w.height() + 'px',
'width': $w.width() + 'px'});
translates to:
"Set the height and width of the element with a class of
jScrollPaneContainer directly inside the body (e.g. not nested any
deeper) to the height and width of the w
I regret, but anything from offered does not work as it is necessary
in Firefox and Safari.
Your initial code should work, I realized that it wasn't working at
the beggining because it wasn't in the DOM.
So this, should work:
$(')
.load(function(){
var width = $(this).width(),
height= $(this).height();
alert(width + ' '+ height);
})
.attr('src'
Just do it the old-fashioned way...
var objImage = new Image();
objImage.onload = function(){
var imgDim = { width : objImage.width, height : objImage.height };
// .. carry on processing...
};
objImage.src = 'myPicture.jpg';
BAlex wrote:
>
>
> Is JavaSc
When you .hide() the element it brings its height and weight to 0 and
then sets 'display' to 'none'. You will get unreliable results trying
to read the .height() and .width() after that.
Try this:
var img0 = $("").css({ visibility:
'hidden' }).appendTo(document.body);
Charles
doublerebel.com
552464979
Has made so:
$(function() {
var url0 = "1.jpg";
var img0 = $("").appendTo(document.body).hide();
var w = img0.width();
var h = img0.height();
alert("//--> h=" + h + ", w=" + w);
});
It works, here results in different browsers:
IE: //--> h=700, w=581 - It is correct
Oper
Your code as is won't work, unless the image is cached - and even then
it'll be hit an miss. The img.src = "1.jpg" line is an asynchronous
call. WHILE the image is loading the next line is executed. Seeing as
the image probably didn't load in a microsecond or less, the
width/height values w
You have to specify the image source, otherwise you are loading
nothing.
The code should read:
var $img0 = $("").load( ..
Charles
On Oct 2, 9:55 am, BAlex <[EMAIL PROTECTED]> wrote:
> Has made:
>
> var width, height;
> var img0 = $("").load(function(){
>
101 - 200 of 304 matches
Mail list logo