🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.javascript
Article #51489

jquery load, div i scrolltop

#51489
From: grzessiek
Date: Fri, 12 Dec 2014 20:06
24 lines
1308 bytes
mam stronę a w niej diva, do którego ajaxam ($('#mojDiv').load()) ładuję 
sobie fragment kodu html, w którym mam:

kolejnego diva z ustawionym stylem: overflow:auto; i jakąś treścią w nim 
zawartą. ten div ma tyle treści, że pojawia się scroll.

poniżej tego diva mam taki fragment kodu:

$(document).ready(function(){
$('#drugiDiv').scrollTop(100);
});

który nie działa.

żeby było śmieszniej, coś takiego działa:

$(document).ready(function(){
$('#drugiDiv').html('aqq');
});

moje pytanie jest proste, WTF?

dzięki,
g.
Technical Details
Message-ID: <m6fhrb$inh$1@speranza.aioe.org>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed.pionier.net.pl!feeder.erje.net!eu.feeder.erje.net!newsfeed.tele2net.at!aioe.org!.POSTED!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed.pionier.net.pl!feeder.erje.net!eu.feeder.erje.net!newsfeed.tele2net.at!aioe.org!.POSTED!not-for-mail
From: grzessiek <grzesiek76@poczta.onet.pl>
Newsgroups: pl.comp.lang.javascript
Subject: jquery load, div i scrolltop
Date: Fri, 12 Dec 2014 21:06:15 +0100
Organization: Aioe.org NNTP Server
Lines: 24
Message-ID: <m6fhrb$inh$1@speranza.aioe.org>
NNTP-Posting-Host: 90ByxaTKQGaqpKFpzQJxfA.user.speranza.aioe.org
Mime-Version: 1.0
X-Complaints-To: abuse@aioe.org
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0
X-Notice: Filtered by postfilter v. 0.8.2
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit