Re: [jQuery] bgiframe update, sneak peak

2007-03-18 Thread John W

Hmm Didnt realize that would do the trick.  Because IE use an active x object
and IE7 does not. I admit Im not the javascript expert. Thanks for pointing
that out.

// This is only for IE6
if ( !($.browser.msie && typeof XMLHttpRequest == 'function') )  
return this;

And yes I do hope they add in a method to check a browser version. I believe
there is a plugin that adds that capability but It would be nice if it was
just native to jquery.



thumblewend wrote:
> 
> On 18/03/2007, at 3:10 PM, John W wrote:
>> Hey guys this is great stuff. Joel your menu works a lot better now  
>> under IE6
>> and Brandon thanks for making Bgiframe updates.  One thing I was  
>> wondering,
>> since IE7 doesnt really suffer from the same issue as IE6 perhaps  
>> there is a
>> way not to fire the bgiframe for IE7. There isnt really a reason  
>> to  have
>> the iframe with IE7 or maybe Im wrong?
>>
>> Too bad with with $.browser you cant specify the browser version  
>> only the
>> type. Hint hint for a jquery update.
> 
> Thanks John.
> Regarding excluding IE7 - the bgIframe already does that with these  
> lines:
> 
> // This is only for IE6
> if ( !($.browser.msie && typeof XMLHttpRequest == 'function') )  
> return this;
> 
> I was reading the archive of the dev list the other day and saw talk  
> about introducing $.browser.msie6. I didn't find what the resolution  
> of the thread was. Does anyone reading this know what was decided?
> 
> Joel.
> 
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/bgiframe-update%2C-sneak-peak-tf3402941.html#a9537223
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] bgiframe update, sneak peak

2007-03-17 Thread John W

Hey guys this is great stuff. Joel your menu works a lot better now under IE6
and Brandon thanks for making Bgiframe updates.  One thing I was wondering,
since IE7 doesnt really suffer from the same issue as IE6 perhaps there is a
way not to fire the bgiframe for IE7. There isnt really a reason to  have
the iframe with IE7 or maybe Im wrong?



thumblewend wrote:
> 
> On 18/03/2007, at 6:34 AM, Brandon Aaron wrote:
>> Okay so I did some testing with this idea and if the element has a
>> background color on it, the iframe will show above it. You can see the
>> result on my test page.
>>
>> --
>> Brandon Aaron
>>
>> On 3/17/07, Brandon Aaron <[EMAIL PROTECTED]> wrote:
>>> Hey Joel,
>>>
>>> Thanks for the information! It is true that the iframe is behind the
>>> element it is called on by setting the z-index to -1 and by where it
>>> is inserted into the DOM. The only time the iframe should show  
>>> through
>>> is if a child element (of the element that has the bgiframe method
>>> called on it) has an opacity of less then 1 on it. I believe I will
>>> take out setting the opacity by default (since in most cases it
>>> doesn't matter) and add an option to include it.
>>>
>>> --
>>> Brandon Aaron
> 
> Hey Brandon, thanks for adding that option - it is perfect. I notice  
> you have set the default as opacity:true (as in, you decided against  
> taking out setting the opacity by default). Is that because of your  
> tests (mentioned in your later post) where the iframe showed through?  
> Regarding that, you said "if the element has a background color on  
> it, the iframe will show above it". When I tested this on my demo  
> page I found that with the opacity code deleted the iframe *always*  
> showed above the element it was attached to *regardless* of whether  
> or not a background colour was set. The reason I didn't notice this  
> earlier is because the element's children (li elements in my case)  
> have background colours so they hide the iframe in effect.
> 
> So I think your current default setting of opacity:true is probably a  
> good idea because 1. it emulates its regular behaviour, and 2. when  
> the situation is like my case the developer can take advantage of  
> setting the opacity option to false and enjoy perfect animations.
> 
> This is perfect for my menu plugin and I have updated my demo page to  
> take advantage of it. This involved using your option to set  
> opacity:false and also adding the following line to my superfish  
> plugin's 'out' function:
> 
> .find("iframe", this).remove();
> 
> I had to add that to the plugin because I wanted it to happen after  
> the mouseout delay, not immediately on mouseout. Anyway, now both  
> slides and fades work perfectly in IE6 (check my demo page) and there  
> is no lag whatsoever! The menu now works equally well in all regards  
> for IE6 as it does for other browsers. I guess the only downside in  
> my case is how convoluted the code is for applying the bgIframe to  
> the menu:
> 
> $(document).ready(function(){
>   $(".nav")
>   .superfish({
>   animation : { opacity:"show",height:"show"}
>   })
>   .find(">li[ul]")
>   .mouseover(function(){
>   $("ul", this).bgIframe({opacity:false});
>   })
>   .find("a")
>   .focus(function(){
>   $("ul", 
> $(".nav>li[ul]")).bgIframe({opacity:false});
>   });
> });
> 
> 
> Thanks for your help Brandon.
> 
> Cheers
> Joel.
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/bgiframe-update%2C-sneak-peak-tf3402941.html#a9535921
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] .load and page reloading twice

2007-03-15 Thread John W

The problems resolved, and it had nothing to do with .load, it was my cgi
script. I bow before the greatness that is jquery.
-- 
View this message in context: 
http://www.nabble.com/.load-and-page-reloading-twice-tf3410393.html#a9506600
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] .load and page reloading twice

2007-03-15 Thread John W

Yeah its got to do with something possibly with the script being called
server side for the ahah load. Its tricky going through old spaghetti code.


Daemach wrote:
> 
> I would try stepping through it then to see what is happening.
> 
> BTW, since you are supposed to have unique IDs for every element on your
> page, you don't really need the div in the selector - #mypage should grab
> the element using getElementByID
> 
> 
> 
> John W wrote:
>> 
>> Tried than in firebug, only one instance found. Thanks for the
>> suggestion.
>> 
>> 
>> Daemach wrote:
>>> 
>>> Do you by any chance have elements with the sameID?  If you are using
>>> firebug, try going to the console and pasting in that selector -
>>> $('div#mypage') - if it returns an array with more than 1 element,
>>> there's your problem.  You can mouse over the array elements and firebug
>>> will highlight the elements on your page.
>>> 
>>> 
>>> 
>>> John W wrote:
>>>> 
>>>> Hi all,
>>>> 
>>>> Im in the process of updating some old javascript to utilize jquery. I
>>>> had some old javascript that used the old
>>>> document.location.  For the heck of it I replaced that with a .load. It
>>>> works, and I know this may not be the best way to do this, but Im
>>>> curious why the page is drawn twice after the load?  And yes I didnt
>>>> use parameters because I intended to use a GET not  POST. Are there any
>>>> technique to force .load to only fire once?
>>>> 
>>>> function headersearch() {
>>>> 
>>>>  var g,h,ch,u;
>>>> 
>>>>  g=document.nsearch.acct.value;
>>>>  h=document.nsearch.bustype.value;
>>>>  ch=document.nsearch.report_type.value;
>>>>  u="parstring=1," + g + ch + "&bustype=" + h;
>>>>  
>>>>  if(ch=="bud") 
>>>>{
>>>> $('div#mypage').load('mypage.html?' + u);
>>>> return false;
>>>>} 
>>>>else 
>>>>{ 
>>>> $('div#mypage').load('mypage.html');
>>>> return false;
>>>>}
>>>> }
>>>> 
>>> 
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/.load-and-page-reloading-twice-tf3410393.html#a9504080
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] .load and page reloading twice

2007-03-15 Thread John W

Tried than in firebug, only one instance found. Thanks for the suggestion.


Daemach wrote:
> 
> Do you by any chance have elements with the sameID?  If you are using
> firebug, try going to the console and pasting in that selector -
> $('div#mypage') - if it returns an array with more than 1 element, there's
> your problem.  You can mouse over the array elements and firebug will
> highlight the elements on your page.
> 
> 
> 
> John W wrote:
>> 
>> Hi all,
>> 
>> Im in the process of updating some old javascript to utilize jquery. I
>> had some old javascript that used the old
>> document.location.  For the heck of it I replaced that with a .load. It
>> works, and I know this may not be the best way to do this, but Im curious
>> why the page is drawn twice after the load?  And yes I didnt use
>> parameters because I intended to use a GET not  POST. Are there any
>> technique to force .load to only fire once?
>> 
>> function headersearch() {
>> 
>>  var g,h,ch,u;
>> 
>>  g=document.nsearch.acct.value;
>>  h=document.nsearch.bustype.value;
>>  ch=document.nsearch.report_type.value;
>>  u="parstring=1," + g + ch + "&bustype=" + h;
>>  
>>  if(ch=="bud") 
>>{
>> $('div#mypage').load('mypage.html?' + u);
>> return false;
>>} 
>>else 
>>{ 
>> $('div#mypage').load('mypage.html');
>> return false;
>>}
>> }
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/.load-and-page-reloading-twice-tf3410393.html#a9503521
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] .load and page reloading twice

2007-03-15 Thread John W

Hi all,

Im in the process of updating some old javascript to utilize jquery. I had
some old javascript that used the old
document.location.  For the heck of it I replaced that with a .load. It
works, and I know this may not be the best way to do this, but Im curious
why the page is drawn twice after the load?  And yes I didnt use parameters
because I intended to use a GET not  POST. Are there any technique to force
.load to only fire once?

function headersearch() {

 var g,h,ch,u;

 g=document.nsearch.acct.value;
 h=document.nsearch.bustype.value;
 ch=document.nsearch.report_type.value;
 u="parstring=1," + g + ch + "&bustype=" + h;
 
 if(ch=="bud") 
   {
$('div#mypage').load('mypage.html?' + u);
return false;
   } 
   else 
   { 
$('div#mypage').load('mypage.html');
return false;
   }
}
-- 
View this message in context: 
http://www.nabble.com/.load-and-page-reloading-twice-tf3410393.html#a9501644
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] bgiframe update, sneak peak

2007-03-14 Thread John W

This is great news Brandon.

-- 
View this message in context: 
http://www.nabble.com/bgiframe-update%2C-sneak-peak-tf3402941.html#a9487729
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] enhanced suckerfish-style menu plugin

2007-03-13 Thread John W

Nice update on the menu Joel. Its a lot smoother now in IE6.

John
-- 
View this message in context: 
http://www.nabble.com/enhanced-suckerfish-style-menu-plugin-tf3374021.html#a9467517
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] enhanced suckerfish-style menu plugin

2007-03-12 Thread John W

Ahh good find I didnt pay attention to this.  Hopefully some other jquery
guru has some suggestions.  Thats my only issue with the menu, that an IE6
=).

These parts seems to be relevant to us:
  * It does take borders into consideration but all values
  * need to be in pixels

My demo uses ems to define the dimensions etc.
also:

  * NOTICE: This plugin uses CSS expersions in order to work
  * with an element's borders, height and with and can result in poor
  * performance when used on an element that changes properties
  * like size and position a lot. Two of these expressions can be
  * removed if border doesn't matter and performance does.

That sounds especially relevant considering that an animation runs on  
the element when the menus are revealed. Maybe removing the  
expressions that relate to borders (if you don't need them) may help  
you. Otherwise, another option could be to do an instant reveal of  
the menu rather than a gradual animation (not as cool of course).

Joel.
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/



-- 
View this message in context: 
http://www.nabble.com/enhanced-suckerfish-style-menu-plugin-tf3374021.html#a9449375
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] enhanced suckerfish-style menu plugin

2007-03-12 Thread John W

Thanks for the reply Joel. The jdmenu (current beta version) is employing the
bgiframe to compensate for this same issue. Basically you bind the bgiclass
to an element like a div or in the case of an ordered list to the the UL
tag.  It then applies an iframe only for IE6. I was able to make it work but
it seems to really slow down the menu but I dont think Im implementing it
right within the code. I really like your menu because its less code, its
fast and smooth.


thumblewend wrote:
> 
> On 13/03/2007, at 4:43 PM, John W wrote:
>> This is a very nice implementation of the suckerfish menu with  
>> jquery. One
>> thing, however, is there any way to add the z-index checking using  
>> something
>> like bgiframe for the IE6 issue of menu elements not hovering over  
>> select
>> menus in IE6? I tried implementing it but it really bogs down the  
>> drop down
>> menus in IE6 a lot which tells me Im doing something wrong.
> 
> Admittedly, the z-index side of things is an area I did not consider.  
> Also, I have no experience with the bgiframe plugin (which I hear is  
> great). It sounds like we need someone with bgiframe knowledge to  
> weigh in here. Any takers?
> 
> Joel.
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/enhanced-suckerfish-style-menu-plugin-tf3374021.html#a9449345
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] enhanced suckerfish-style menu plugin

2007-03-12 Thread John W

This is a very nice implementation of the suckerfish menu with jquery. One
thing, however, is there any way to add the z-index checking using something
like bgiframe for the IE6 issue of menu elements not hovering over select
menus in IE6? I tried implementing it but it really bogs down the drop down
menus in IE6 a lot which tells me Im doing something wrong.
-- 
View this message in context: 
http://www.nabble.com/enhanced-suckerfish-style-menu-plugin-tf3374021.html#a9448779
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] specifying count for rss feed display with each function

2007-02-21 Thread John W

My mistake.  I hard coded the value in the code I pasted by accident.

this:
 $("item", xml).lt(10).each(function(){

should be
 $("item", xml).lt(items_count).each(function(){



Kristinn Sigmundsson wrote:
> 
> hmm, shouldn't you variable items_count, be used in lt(items_count)?
> can't see where it's used in you script.
> 
> //Kristinn
> 
> On 2/22/07, John W <[EMAIL PROTECTED]> wrote:
>>
>> Just thought Id post the full deal (well the itty bitty jquery script)
>> for
>> anyone else that is looking for something similiar to put rss feeds in
>> their
>> website. the cool thing is that with the latest version of jquery this
>> works
>> with remote urls. In the past I had to grab the file locally on my
>> domain.
>>
>> Have to give credit to Jim Davis since I found his post on the topic
>> earlier.
>> http://www.nabble.com/RSS-Feed-Reader---Re-visit-tf1915606.html#a5244340
>>
>>
>> 
>> 
>> > type=text/javascript>
>> 
>>
>> var html = '';
>> // count for lines display
>> var items_count = 10;
>> // feed location
>> var feed = '<a  rel="nofollow" href="http://rss.movies.yahoo.com/dvd/topsellers.xml">http://rss.movies.yahoo.com/dvd/topsellers.xml</a>';
>> // replace url for link
>> var u =
>> 'mainitem.html?hdSearchType=Catalog&radCateg=DVD&selSearchOption=Begins&selSortType=descr&chkDetailView=off&txtSearch='
>>
>> $(document).ready(function(){
>>   $.get(feed, function(xml){
>>   $("item", xml).lt(10).each(function(){
>>   $(this).find("item").each(function(){
>>   html += "";
>>   }).end().find("title").each(function(){
>>   html += " " + u + this.text + " " + this.text +
>> "
>> <br>";
>>   });
>>   });
>>
>>   $("#rss").html(html).slideDown("slow");
>>
>>   });
>> });
>>
>> 
>> 
>> 
>> Loading...
>> 
>> 
>> --
>> View this message in context:
>> http://www.nabble.com/specifying-count-for-rss-feed-display-with-each-function-tf3269015.html#a9091666
>> Sent from the JQuery mailing list archive at Nabble.com.
>>
>>
>> ___
>> jQuery mailing list
>> discuss@jquery.com
>> http://jquery.com/discuss/
>>
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/specifying-count-for-rss-feed-display-with-each-function-tf3269015.html#a9093057
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] and a final example

2007-02-21 Thread John W

Just thought Id post the full deal (well the itty bitty jquery script) for
anyone else that is looking for something similiar to put rss feeds in their
website. the cool thing is that with the latest version of jquery this works
with remote urls. In the past I had to grab the file locally on my domain.

Have to give credit to Jim Davis since I found his post on the topic
earlier.
http://www.nabble.com/RSS-Feed-Reader---Re-visit-tf1915606.html#a5244340







var html = '';
// count for lines display
var items_count = 10;
// feed location
var feed = 'http://rss.movies.yahoo.com/dvd/topsellers.xml'; 
// replace url for link
var u =
'mainitem.html?hdSearchType=Catalog&radCateg=DVD&selSearchOption=Begins&selSortType=descr&chkDetailView=off&txtSearch='

$(document).ready(function(){
  $.get(feed, function(xml){
  $("item", xml).lt(10).each(function(){
  $(this).find("item").each(function(){
  html += "";
  }).end().find("title").each(function(){
  html += " " + u + this.text + " " + this.text + "

"; }); }); $("#rss").html(html).slideDown("slow"); }); }); Loading... -- View this message in context: http://www.nabble.com/specifying-count-for-rss-feed-display-with-each-function-tf3269015.html#a9091708 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/

[jQuery] and a final example

2007-02-21 Thread John W

Just thought Id post the full deal (well the itty bitty jquery script) for
anyone else that is looking for something similiar to put rss feeds in their
website. the cool thing is that with the latest version of jquery this works
with remote urls. In the past I had to grab the file locally on my domain.

Have to give credit to Jim Davis since I found his post on the topic
earlier.
http://www.nabble.com/RSS-Feed-Reader---Re-visit-tf1915606.html#a5244340







var html = '';
// count for lines display
var items_count = 10;
// feed location
var feed = 'http://rss.movies.yahoo.com/dvd/topsellers.xml'; 
// replace url for link
var u =
'mainitem.html?hdSearchType=Catalog&radCateg=DVD&selSearchOption=Begins&selSortType=descr&chkDetailView=off&txtSearch='

$(document).ready(function(){
  $.get(feed, function(xml){
  $("item", xml).lt(10).each(function(){
  $(this).find("item").each(function(){
  html += "";
  }).end().find("title").each(function(){
  html += " " + u + this.text + " " + this.text + "

"; }); }); $("#rss").html(html).slideDown("slow"); }); }); Loading... -- View this message in context: http://www.nabble.com/specifying-count-for-rss-feed-display-with-each-function-tf3269015.html#a9091667 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/

[jQuery] and the final simple little feeder

2007-02-21 Thread John W

Just thought Id post the full deal (well the itty bitty jquery script) for
anyone else that is looking for something similiar to put rss feeds in their
website. the cool thing is that with the latest version of jquery this works
with remote urls. In the past I had to grab the file locally on my domain.

Have to give credit to Jim Davis since I found his post on the topic
earlier.
http://www.nabble.com/RSS-Feed-Reader---Re-visit-tf1915606.html#a5244340







var html = '';
// count for lines display
var items_count = 10;
// feed location
var feed = 'http://rss.movies.yahoo.com/dvd/topsellers.xml'; 
// replace url for link
var u =
'mainitem.html?hdSearchType=Catalog&radCateg=DVD&selSearchOption=Begins&selSortType=descr&chkDetailView=off&txtSearch='

$(document).ready(function(){
  $.get(feed, function(xml){
  $("item", xml).lt(10).each(function(){
  $(this).find("item").each(function(){
  html += "";
  }).end().find("title").each(function(){
  html += " " + u + this.text + " " + this.text + "

"; }); }); $("#rss").html(html).slideDown("slow"); }); }); Loading... -- View this message in context: http://www.nabble.com/specifying-count-for-rss-feed-display-with-each-function-tf3269015.html#a9091664 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/

Re: [jQuery] specifying count for rss feed display with each function

2007-02-21 Thread John W

Just thought Id post the full deal (well the itty bitty jquery script) for
anyone else that is looking for something similiar to put rss feeds in their
website. the cool thing is that with the latest version of jquery this works
with remote urls. In the past I had to grab the file locally on my domain.

Have to give credit to Jim Davis since I found his post on the topic
earlier.
http://www.nabble.com/RSS-Feed-Reader---Re-visit-tf1915606.html#a5244340







var html = '';
// count for lines display
var items_count = 10;
// feed location
var feed = 'http://rss.movies.yahoo.com/dvd/topsellers.xml'; 
// replace url for link
var u =
'mainitem.html?hdSearchType=Catalog&radCateg=DVD&selSearchOption=Begins&selSortType=descr&chkDetailView=off&txtSearch='

$(document).ready(function(){
  $.get(feed, function(xml){
  $("item", xml).lt(10).each(function(){
  $(this).find("item").each(function(){
  html += "";
  }).end().find("title").each(function(){
  html += " " + u + this.text + " " + this.text + "

"; }); }); $("#rss").html(html).slideDown("slow"); }); }); Loading... -- View this message in context: http://www.nabble.com/specifying-count-for-rss-feed-display-with-each-function-tf3269015.html#a9091666 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/

Re: [jQuery] specifying count for rss feed display with each function

2007-02-21 Thread John W

Just thought Id post the full deal (well the itty bitty jquery script) for
anyone else that is looking for something similiar to put rss feeds in their
website. the cool thing is that with the latest version of jquery this works
with remote urls. In the past I had to grab the file locally on my domain.

Have to give credit to Jim Davis since I found his post on the topic
earlier.
http://www.nabble.com/RSS-Feed-Reader---Re-visit-tf1915606.html#a5244340







var html = '';
// count for lines display
var items_count = 10;
// feed location
var feed = 'http://rss.movies.yahoo.com/dvd/topsellers.xml'; 
// replace url for link
var u =
'mainitem.html?hdSearchType=Catalog&radCateg=DVD&selSearchOption=Begins&selSortType=descr&chkDetailView=off&txtSearch='

$(document).ready(function(){
  $.get(feed, function(xml){
  $("item", xml).lt(10).each(function(){
  $(this).find("item").each(function(){
  html += "";
  }).end().find("title").each(function(){
  html += " " + u + this.text + " " + this.text + "

"; }); }); $("#rss").html(html).slideDown("slow"); }); }); Loading... -- View this message in context: http://www.nabble.com/specifying-count-for-rss-feed-display-with-each-function-tf3269015.html#a9091665 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/

Re: [jQuery] specifying count for rss feed display with each function

2007-02-21 Thread John W

Ahh I see.  THank you guys this really helps.  Jquery is great.



Karl Swedberg-2 wrote:
> 
> Hi John,
> 
> It works just like a "for" loop. You can put the "i" in the anonymous  
> function argument for .each(). For example:
> 
> $('p').each(function(index) {
>alert('This is paragraph number ' + index);
> });
> 
> (I used "index" instead of "i" because I'm kind of dense, and it  
> helps to remind me what it is).
> 
> 
> --Karl
> _
> Karl Swedberg
> www.englishrules.com
> www.learningjquery.com
> 
> 
> 
> On Feb 21, 2007, at 3:11 PM, john smith wrote:
> 
>> Sorry all Im still a newb to jquery. Ive been messing around with  
>> using jquery for grabbing and displaying rss feed info. A lot less  
>> code then using straight javascript. what Im not quite clear on is  
>> how you grab a specific count from doing an .each
>>
>> For example if I grab a feed with the jquery code below
>>
>> // count for lines display
>> var items_count = 10;
>>
>> // feed location
>> var feed = my.xml';
>>
>> // replace url for link
>> var u = 'http://www.mypage.html?txtSearch='
>>
>> $(document).ready(function(){
>>   $.get(feed, function(xml){
>>   $("item", xml).each(function(){
>>   $(this).find("item").each(function(){
>>   html += "";
>>   }).end().find("title").each(function(){
>>   html += " '" + u + this.text +  
  "'>" + this.text + " ";
>>   });
>>   });
>>   $("#feed").html(html).slideDown("slow");
>>
>>   });
>> });
>>
>> Using jquery how do I do a for each count like:
>> for(var i=0; i>
>> Access over 1 million songs - Yahoo! Music Unlimited.
>> ___
>> jQuery mailing list
>> discuss@jquery.com
>> http://jquery.com/discuss/
> 
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/specifying-count-for-rss-feed-display-with-each-function-tf3269015.html#a9089093
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/