|
Tutorial: Dynamic content on first load using ajax
|
|
28th June, 05:44
Post: #1
|
|||
|
|||
|
Tutorial: Dynamic content on first load using ajax
This will show you a relatively easy way to do dynamic content via ajax, in which the ajax call only happens the first time the tooltip is rendered.
I struggled with finding a solution I was happy with for a while. Most of the dynamic content examples for the qTip 1.0 versions seem to show the content being loaded from urls only, with no data being passed with the request. I was glad to arrive at a simple and fairly straightforward solution. This also shows how you can use metadata, such as an object id or object type, to dynamically pass that metadata with the ajax request. In this example I use a Ford Explorer and Trek Bike because their associated data could potentially live in separate database tables (such as a `bike` table and a `vehicle` table). When requesting data for them, it passes along their associated id and type, which I placed in the id attribute of their respective div elements. I find this extremely handy when working with ajax that retrieves data from a database. I use jQuery.post() for the ajax request which just a shorthand version of jQuery.ajax() that sets the method to post. I used qTip Revision 54 for this example. HTML Code
JS Code
You may need to switch all instances of jQuery to a dollar sign for this to work. I always use jQuery in noConflict() mode because so many javascript libraries want to take control of the dollar sign. |
|||
|
23rd June, 09:49
Post: #2
|
|||
|
|||
|
RE: Tutorial: Dynamic content on first load using ajax
but all browser are not support to java script.
|
|||
|
22nd July, 08:50
Post: #3
|
|||
|
|||
|
RE: Tutorial: Dynamic content on first load using ajax
Juicy Couture is marketed as a high-end clothing line at an affordable price,and is famous for fashion leisure modern clothing brand. Juicy Couture Outlet offerings range from perfume,watches,sunglasses,Juicy Courue tracksuits,Juicy Couture handbags to toiletries, Juicy Couture Bags, and so on.
|
|||
|
« Next Oldest | Next Newest »
|
| Possibly Related Threads... | |||||
| Thread: | Author | Replies: | Views: | Last Post | |
| Dynamic Content on first show, not page load | TheOverbob | 6 | 6,384 |
2nd August 13:01 Last Post: Craig |
|
| [Solved] Displaying tooltip on page load/mouseover otherwise | burghars | 1 | 970 |
18th July 11:55 Last Post: Craig |
|
| Load an HTML Page Within qTip Tooltip | BruceBruce | 3 | 2,695 |
19th January 12:17 Last Post: Craig |
|
| [Solved] qTp modal dialog , on page load | c0mrade | 5 | 3,586 |
13th August 16:13 Last Post: mattsyk |
|
| how to load different content each time | andufo | 1 | 1,645 |
28th May 16:00 Last Post: andufo |
|
| Callbacks fire on page load when they shouldn't | anomalous | 1 | 1,162 |
Today 22:12 Last Post: anomalous |
|
| Dynamic content loaded on mouseover | aboudard | 4 | 4,548 |
26th September 17:09 Last Post: pre |
|
User(s) browsing this thread: 1 Guest(s)

Search
Member List
Calendar
Help



