Add the line jQuery(".jbgallery").jbgallery(); to the end of your OnLoad
function, as below:
function OnLoad() {
feed.load(feedLoaded);
jQuery(".jbgallery").jbgallery();
}
If the jQuery line depends on the feed being loaded, you'll need to move it
into feedLoaded, as below:
function feedLoaded(result){
// do stuff with the feed results
jQuery(".jbgallery").jbgallery();
}
Finally, isn't the jQuery code supposed to start with $? I.e.,
$(document).ready( and $(".jbgallery"). ?
Jeremy R. Geerdes
Effective website design & development
Des Moines, IA
For more information or a project quote:
http://jgeerdes.home.mchsi.com
[email protected]
If you're in the Des Moines, IA, area, check out Debra Heights Wesleyan Church!
On Apr 21, 2010, at 1:31 AM, soujiro0725 wrote:
> hi. I am trying to combine Ajax Feed API with a regular jQuery code.
>
> By using Ajax Feed API, I am adding DOM elements to html. After that,
> a normal jQuery code manipulates these DOM elements, which have
> nothing to do with Ajax API.
>
> But it seems that this jQuery part is ignored, and only added DOM
> elements are shown. I am guessing that the problem is the timing of
> execution.
>
> For Ajax Feed API, "setOnLoadCallback" is to be used, then how can I
> combine these two procedures?
>
> //------------------code starts here---------------------------------
> google.load("feeds", "1");
> function feedLoaded(result) {
> //
> }
>
> function OnLoad() {
> //
> feed.load(feedLoaded);
> }
> google.setOnLoadCallback(OnLoad);
>
> jQuery(document).ready(function(){
> jQuery(".jbgallery").jbgallery();
> });
> //-------------------code ends here-----------------------------------
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google AJAX APIs" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/google-ajax-search-api?hl=en.
>
--
You received this message because you are subscribed to the Google Groups
"Google AJAX APIs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-ajax-search-api?hl=en.