I am currently working on a web app and using JGFid to pull an RSS feed from my blog . (After all, I'm pulling up in Jacquachch to build UI). I'm capable of catching the stuff I want, now I need the next step.
What I need to do, first, display a list of links These links are the title of each entry when a user clicks on this link, then users to read the content for this particular entry Is displayed for
I do not have the experience to do this, so I'm proud of this point. But now I have to take it to the next level and use some guidance to work with Array and can get it to work within jQuery. Any suggestions or examples would be greatly appreciated
Here is my code:
";} $ ("# results_titles") .HTML ("& lt; ul>" + title + "& lt; / ul & gt;"); $ ( "# Results_content") .HTML ("& lt; ul & gt;" + Content + "");}, 10);}); & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Div id = "results_titles" & gt; LOADING & lt; / Div & gt; & Lt; Div id = "results_content" & gt; LOADING & lt; / Div & gt; & Lt; / Body & gt; & Lt; / Html & gt;
What I think is, you want to share those feeds. In an array Entries are the array if you already have an array in the Feeds.entries you want. Then feeds.nantry [0]. Title You Should Headline and Feeds.Sentry [0]. Prepare the material to try something like this:
// < Ul & gt; & Lt; Li & gt; & Lt; A & gt; & Lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; Structure link var sAnchors = '& lt; Ul & gt; '; (Var i = 0; i & lt; feeds.entries.length; i ++) {var sAnchors + = "and a href = '# link' id = 'title _" + I + "'class =' giveFeeds' & gt; feeds.entries [i] .title & lt; / a & gt; & lt; / li & gt;"; } SAnchors + = '& lt; / Ul & gt; '; // & lt; A & gt; Attach. . $ ('#comes_titles') (sAnchors) attached; // When the user clicks on the Laidides link ... $ ('.a feeds'). Live ('click', function (e) {// feed number var tmpId = $ (e.target) .attr get ('Id'); // '_' returns the value after char and ensures it That this number returns. Use the var id = parseInt (tmpId.split ('_') [1]); // value to get the desired feed. Feed = feed. [ID] Content. ; // whatever you want with that entry ...}); You can get some problems like Vars such as Feeds.nantry Since you want to consider it global I suggest you "For" loop (SDIV = '' + Feeds In Entries [i] .content + "";) In this way, you only need to enter id var (var id = ParseInt (...)) to show what you want to show ($ ('# Content' + id) .show ()) Finally, animate. See these methods on the Net.
Comments
Post a Comment