hi everyone,

first off thanks for making Drupal the best CMS package available !!

about me:
i am very new to both Drupal & jQuery concepts and i am not 100% sure that i am doing everything correctly, but at this stage it's really about getting in there and trying things out, i learn best by experience.. that said i really do need to get a good book this weekend to smooth out some of my confusion.
i am coming to this with a good amount of javascript, php, perl and java code development knowledge, so i kind of think that i know how Drupal is doing things but i still need to develop my skills and understanding to be a better developer in this environment. I have volunteered to rebuild a small website for my mother, and i am using this to learn Drupal better...

background info:
today i have included jQuery plugins support at the site (www.carol-cleveland.com)
one of my views is a gallery of photo nodes, i added the border frame and dropshadow code by placing my jQuery function calls in the footer of the 'view' page (it took me most of the day researching various video and text document tutorials to find out that this was one way to achieve what i need - it may not be the best way but it does work LOL)

the problem:
i am using custom pager to enable multiple gallery page views when the photo count exceeds the 6 maximum i have set per page, my laptop display is not very high in pixel resolution in the Y direction, so i am having to scroll down in my browser to be able to see and click the ">>" to flip to the next page of photos, and when i do switch pages like this the drop shadow positions are not nicely aligned with the img containers as they are on the initial page (which is not scrolled)..
example here: Photo gallery

i have in fact seen and had this problem myself in the past, when i was coding some custom made tooltip rollovers back in about 2001 when divs, layers and the whole dynamic positioning of content was pretty new stuff, i noticed that when the page was scrolled my tooltips would appear away from the desired position and the more the page was scrolled the further away they would be, so eventually i did figure out that i had to incorporate the page scroll offset into my positioning calculations, i remember fixing this with javascript but i don't think i have that old code laying around anymore, so i can't research exactly how this was implemented.

anyway..
as i said at the top i'm really a noob with both Drupal and jQuery so hopefully someone more experienced will know what i am talking about and be able to steer me back on course.

i am hoping that i can maybe just inform jQuery somehow to do a window.resize() call and it will re-calculate the positions / dimensions of things and maybe recognize there is some scroll offset to be aware of, i don't know, i'm guessing now LOL
also i don't know if this is a dimension.js or a dropshadow.js or a module issue OR maybe i am just not using the library correctly ??

many thanks to everyone in the Drupal community

here is the code from the view footer (it is set to input format 'Full HTML')

<script type="text/javascript">
// add shadow
$('.thickbox img').css('border', '1px solid black').css('background-color', '#000').dropShadow({left: 6, top: 6, blur: 1, opacity: 0.5});
</script>

Comments

ccleveland’s picture

Category: bug » task
Status: Active » Closed (fixed)
Issue tags: +Ajax

i solved this by changing the view setting..

"Use AJAX:No"

jQuery drop shadow works fine without AJAX pre-loading the images =)