-
☆ A M B ☆
- 54 Posts
This is not possible this way. Snippets are Php (which is done server side) and jQuery is Javascript (which is done client side). This means that the page is already fully parsed and rendered and send to the browser. And then the browser starts to process your Javascript.
Thanks for your reply.
Then how can i get the content of child resource and display it in a div, when mouse enter on a div.
-
☆ A M B ☆
- 54 Posts
Here are 2 approaches:
1.
Put the content in your div and hide it with CSS. Display the div with Javascript on mouseenter (or with CSS on :hover).
2.
Create an Ajax request that dynamically loads the content into your div.
Can you show me how i can create Ajax that dynamically take the content of resource when we pass the parent resource id.?
can you also show me how could i call this snippet by passing the variable in jquery.
what type of resourse is "ajax"?
Is "ajax" is a chunk or a resource page?
-
☆ A M B ☆
- 54 Posts
"ajax" is a resource page. You can give it an empty template. The snippet "ajaxGetResources" goes into the content of this resource.