JQuery Implementation
RogersDA
Registered Users Posts: 3,502 Major grins
There is an image feature written in javascript that I am trying to experiment with on my site, but it requires jQuery.
Now - I am not a coder and not so proficient in determining how to implement this.
So - is this possible to do on SmugMug?
Now - I am not a coder and not so proficient in determining how to implement this.
So - is this possible to do on SmugMug?
0
Comments
I noticed that the library load is called by
So - placing this above the script to be used is all that is needed? How does this actually call the library (how will that actually make the load call to Google without a pathname?
GreyLeaf PhotoGraphy
http://encosia.com/2008/12/10/3-reasons-why-you-should-let-google-host-jquery-for-you/
Thanks for posting!
Based on that I placed this in my Top Javascript
I guess, based on that site's instructions, I am not sure if the last line:
$(document).ready(flexiBackground.initialize);
should go in the Top Javascript, too, or should it go someplace else.
Also - I am not sure if the open and closing script tags are needed as SmugMug places them there by default.<img src="https://us.v-cdn.net/6029383/emoji/ne_nau.gif" border="0" alt="" >
GreyLeaf PhotoGraphy
GreyLeaf PhotoGraphy
Next, the rest of the javascript would need to go in the "custom header" or the "bottom javascript" as SmugMug pulls in the top javascript prior to the head tag. Putting it in the bottom javascript may be too late.
With all that said, I would probably put all of the logic at the top of the "custom header" (skip adding anything to the head tag). This includes the call to pull in the jsapi and everything else. Just leave it all wrapped in the script tags as presented originally. This will keep all of the logic together and easily manageable.
Hope this helps.
GreyLeaf PhotoGraphy
I placed the following in my Custom Header and it did properly display the requested text in the div.
So I'm guessing the logic you are attempting to use needs some tweaking to work within SmugMug.
http://gallery.primarycolors.com/
I've only viewed it with Firefox and there appears to be an issue with the background image scrolling until you resize the browser then it seems to do as the article describes. -- This still appears flakey.. I had to resize/maximize a few times.
Here is what I did:
Add to CSS
Modified my body tag in CSS:
Note: I think the "important" part is important in getting this to work!
Add to Custom Header:
Note that I shouldn't be pulling the script from kimili.com (bad netiquette); instead it should be included directly in the SmugMug customization. I just did it this way as a quick test.
I will be removing the code at some point within the next 24 hours but it's not something I'm looking to do at this point but it's a cool idea.
that must be changed to match the size of the background image used.
At any rate I will play more this evening when I get home. Thanks a lot for the help!
GreyLeaf PhotoGraphy
Anyway, it's been a fun diversion this afternoon, but I will probably remove it from my site. I'm looking forward to checking it out on your site if you decide to implement it.
After some cleaning here at the house i will experiment some more.
GreyLeaf PhotoGraphy
Again - thanks!!!! Now to test some alternate browsers.
GreyLeaf PhotoGraphy
You might just convince me to do something similar...
If I am ever in Vegas I'll hook you up with your beverage of choice for the assistance!
GreyLeaf PhotoGraphy
Here is my website: https://www.chadberryhillphotography.com