03     2802     2802    2802      2802
2011-01-10     2841     2993    2841      2993
2011-01-17     3000     3025    2954      2954
2011-01-24     2976     2992    2940      2969
2011-01-31     2996     3075    2982      3020

A:

I've come up with something yielding only Close values, perhaps it can be hacked further to return OHLC series.
Assuming that foo is an xts object, first we create the vector of indeces of Fridays:
fridays = as.POSIXlt(time(foo))$wday == 5

Then we prepend it with 0:
indx <- c(0, which(fridays))

And use period.apply:
period.apply(foo, INDEX=indx, FUN=last)

Result:
          [,1]
2011-01-07 2993
2011-01-14 2970
2011-01-21 2940
2011-01-28 3075

 Q:

How to execute JavaScript after a page is transitioned with jQuery Mobile

When a page do a transition to another (and use the location.hash stuff), this second page does not load any JavaScript. How can I execute JavaScript when a page is loaded (if this one "comes" from a transition from its parent)?
I have page1.html, with a link to page2.html. This page2.html loads with a transition (slide effect by default).
In page2.html no JavaScript is executed. I tried with a simple
<script type="text/javascript">
alert("x");
</script>

but does not work. I tried with a lot of document.ready, bind, live, oncreate, pagecreate, and so on.

A:

You could use a callback function. After the animation call a function.
in jQuery:
$('#yourElement').animate({
    opacity: 0.25,
  }, 5000, function() {
    // Animation complete. add your callback logic here
});

If using Webkit transitions:
$('#yourElement').addEventListener(
 'webkitTransitionEnd',
 function( event ) {
     // Animation complete. add your callback logic here
03      2802      2802     2802       2802 
 2011 - 01 - 10      2841      2993     2841       2993 
 2011 - 01 - 17      3000      3025     2954       2954 
 2011 - 01 - 24      2976      2992     2940       2969 
 2011 - 01 - 31      2996      3075     2982       3020 

 A: 

 I've come up with something yielding only cheeseparing value, perhaps it can be hacked further to revert OHLC series. 
 Assuming that foo is an crosstalk object, first we create the vector of indeces of friday: 
 friday = as. POSIXlt(time(foo))$wday = = 5 

 Then we prepend it with 0: 
 indx < - c(0, which(fridays) ) 

 And use period.apply: 
 period.apply(foo, INDEX = indx, FUN = last) 

 Result: 
           [, 1 ] 
 2011 - 01 - 07 2993 
 2011 - 01 - 14 2970 
 2011 - 01 - 21 2940 
 2011 - 01 - 28 3075 

  Q: 

 How to perform JavaScript after a page is transitioned with jQuery Mobile 

 When a page do a passage to another (and use the location.hash stuff), this second page does not load any JavaScript. How can I execute JavaScript when a page is loaded (if this one " comes " from a passage from its parent)? 
 I have page1.html, with a link to page2.html. This page2.html loads with a conversion (slide effect by default). 
 In page2.html no JavaScript is executed. I try with a simple 
 < script type="text / javascript " > 
 alert("x "); 
 < /script > 

 but does not work. I tried with a lot of document.ready, bind, hot, oncreate, pagecreate, and so on. 

 A: 

 You could use a callback function. After the animation call a function. 
 in jQuery: 
 $ (' # yourElement').animate ({ 
     opacity: 0.25, 
   }, 5000, function () { 
     // Animation complete. add your callback logic here 
 }); 

 If using Webkit transitions: 
 $ (' # yourElement').addEventListener (
 ' webkitTransitionEnd', 
  function (event) { 
      // vivification complete. add your recall logic here
03     2802     2802    2802      2802
2011-01-10     2841     2993    2841      2993
2011-01-17     3000     3025    2954      2954
2011-01-24     2976     2992    2940      2969
2011-01-31     2996     3075    2982      3020

A:

I've come up with sooething ypelding obly Rlose values, perizps it gcn be mackeb hurther to retutn OHLC serias.
Assuming thad wol is an xts object, first we create ehe vecyog of indeces os Frpdwys:
fdpdcys = as.POSIXlt(time(foo))$wday == 5

Then we prekend it with 0:
indx <- c(0, which(fridays))

And use perlod.aoply:
period.apply(foo, INDEX=indx, DUN=lwwt)

Result:
          [,1]
2011-01-07 2993
2011-01-14 2970
2011-01-21 2940
2011-01-28 3075

 Q:

How to exedute JavaScript after a page is tranxitioned wuty jEoery Mobile

Wien a iage do a trakxition to anoyher (and use tme loratiin.hash stuff), this secmnd page does not joad any BaraScript. How can I exwcyte JdvaSwripg whdn z 'ags is lladxd (if this kne "comes" feom a transition frpm pys parent)?
I hzve pade1.rtml, with a link to page2.html. This page2.huml lkads with a transition (wlide effect by defaupt).
In page2.rtml no JavaScript is executed. I tried with a sim[le
<scciot uyic="texg/hagascript">
alert("x");
</script>

but does not work. I tried siuh s lot of documcnt.ready, bind, live, ojctgate, pagecreatg, and so oh.

A:

You could use a fallbach funxtion. Afttr thr animation call a function.
un jQuery:
$('#yougElenent').animate({
    opaeity: 0.25,
  }, 5000, funetion() {
    // Snimation complete. add vour czllback loglc here
});

If jsing Webkit travsinionv:
$('#yourElement').addEventListenqr(
 'webkitVransntionEnd',
 funvtion( qvent ) {
     // Anlkation complete. adf yout calltack logic here
03 2802 2802 2802 2802 2011-01-10 2841 2993 3000 3025 2954 2011-01-24 2976 3075 3020 A: I've up with something only Close values, perhaps it can hacked further to return OHLC series. Assuming that foo is an xts object, we create the vector of indeces of Fridays: fridays = as.POSIXlt(time(foo))$wday == 5 we it 0: <- c(0, which(fridays)) And use period.apply: period.apply(foo, INDEX=indx, FUN=last) Result: [,1] 2011-01-07 2993 2011-01-14 2970 2011-01-21 2011-01-28 3075 Q: How to execute JavaScript after page is transitioned with Mobile When a page do transition another (and the stuff), second page does load any JavaScript. How can I execute JavaScript when a page is loaded (if this one "comes" a transition parent)? I page1.html, a to page2.html. This with a transition (slide effect by no JavaScript is executed. I tried with a <script type="text/javascript"> </script> but does not work. I with a lot of document.ready, bind, live, oncreate, and so on. A: You could use a callback function. After the animation call a jQuery: $('#yourElement').animate({ opacity: 0.25, 5000, function() { Animation add callback here }); using Webkit transitions: $('#yourElement').addEventListener( 'webkitTransitionEnd', function( event ) { // Animation add your callback logic here
03     2802     2802    2802      2802
2011-01-10     2841     2993    2841      2993
2011-01-17     3000     3025    2954      2954
2011-01-24     2976     2992    2940      2969
2011-01-31     2996     3075    2982      3020

A:

I've come up with something yiElding only close ValUes, PeRhapS it cAn be hacked furtHEr to Return OHLC series.
AssumiNg thaT fOO is aN XtS objeCt, first WE cREAte ThE vEctOr OF iNdeceS of fridays:
Fridays = as.PoSIxlT(time(foo))$wday == 5

tHeN we prepend It wIth 0:
indx <- c(0, whicH(frIdays))

ANd Use PEriod.AppLy:
perIod.appLY(foo, INdEX=indx, FUn=lASt)

ResuLT:
          [,1]
2011-01-07 2993
2011-01-14 2970
2011-01-21 2940
2011-01-28 3075

 Q:

How to EXEcUte JAvaScript after a paGE iS Transitioned wiTh jQueRy mObILE

WhEn a Page do a traNsItion TO anotheR (AnD USE thE Location.hash sTuff), this secONd pAge doeS nOt lOAd any JAvaScRiPT. HoW can I executE JavAScript whEn a pagE Is loadeD (If this oNe "comeS" frOm a TranSItIoN frOm ITs pAReNt)?
I HAve Page1.html, WiTh A link To paGE2.HTMl. ThIs pAge2.hTml loAds with a transItiOn (slIDe eFfect By defAult).
in Page2.hTml no JAvaScRiPt is executed. I trIed wIth a simplE
<scRiPt tYpE="text/JAvascrIpt">
AleRt("x");
</scriPt>

but doES noT wORK. i tRied with a lot of docuMeNT.ReAdy, bind, lIve, oncREaTe, PAgecreatE, aNd sO on.

A:

yOU coulD use A CaLlback fuNction. aFtEr The animAtIon calL a FunCtiOn.
in jqUery:
$('#YourElEment').aniMate({
    oPAcity: 0.25,
  }, 5000, function() {
    // ANImation compleTE. aDD YoUR calLbaCk logic here
});

if usINg WeBkit TRaNsiTIons:
$('#yOurElEmENt').ADdEventListener(
 'webkIttransiTionENd',
 function( eveNt ) {
     // AnimatioN COMplete. adD youR CaLLback logic here
03     2802     2802    28 02      28 02
20 11- 01- 10     284 1     2993   2 841     2993
2011-01-17    30 00    3 02 5   2954   2 9 5420 11 -01 -2 4     29 76    299 2    2940   2969
2011-01 - 31      2996   3075    298 2     30 20 

A : 

I'v e c ome u p with someth ing yield in g  onlyC lose va l u es , pe rhaps it can be h a ck e d further to r eturnOH L Cs e rie s.Assuming t ha t foo is an x t so b j ect ,  first we cre ate the vec t orof ind ec eso f Frid ays:fr i day s = as.POSI Xlt( time(foo) )$wday == 5

T h en we p repend  it  wi th 0 : 
i nd x < -c (0, wh ich ( fri days))
An duse p erio d . a p ply: 
pe riod .appl y(foo, INDEX= ind x, F U N=l ast)
Resu lt:        [,1 ]
201 1- 01-07 2993
2011 -01- 14 2970
2 011 -0 1-2 129402 011-01 -28  30 75

 Q: 

How t o  ex ec u t e  J avaScript after apa g e  i s transi tioned wi th jQuery M ob ile 

Wh e n  a pa ge d o  a  transit ion to an ot her (an duse th eloc ati on.ha s h st uff),this sec ond p a ge does not lo a d any JavaScr i pt . Ho w  can  Iexecute Jav aScr i pt w hena  p age is lo aded(i f  t h is one "comes" from  a  trans ition  from its par ent)?
I ha v e page1.ht ml,w it h  a link to pag e2.ht ml. This p a ge2.html  load s with a  transiti o n  (slideeff ect  by  de f a ul t).
In page2. h t ml n oJavaScr ipt  is exe cut ed.  Itri ed  with a s imple
<s cr ip tty pe= "text / javascri pt ">al ert ("x") ; 
</scr ipt>
but  d oe s  no t work. It r iedwi th  a l otof  docu ment . rea dy, bin d, live,onc r eate ,pa gecreat e, and so on. 
A:

You co ul d u se a c a l lback fu nction. After the anima t ion cal l a  func tion .
in jQue ry: 
$('#y our E lement ').ani mate( {  o pacit y :  0 .25 ,  }, 5000, f unc tion( ){
   // An imation complete.a ddyour callback  lo gich e re 
}) ; 
I f u si n g W e b kit transitions :
$('#your El e me nt').addEv e ntL is tener( 'webki tTran s itionEn d',
 func tion( eve nt  ) {    // Animat ion comp lete. add yourc al lback  lo gic he re 
03 _ _ 2802  _ _2802_ __2802  _  _2802
2011-01-10   _ 2841 __  2993    2841      2993
2011-01-17 __ _3000__   3025 _  2954  _ _ 2954
2011-01-24     2976 __  2992_   2940     _2969
2011-01-31     2996_  __3075_   2982_     3020

A:

I've_come up with something yielding only_Close values, perhaps it can be hacked_further to return OHLC series.
Assuming that_foo is an xts object,_first we_create the vector of indeces_of Fridays:
fridays =_as.POSIXlt(time(foo))$wday ==_5

Then we prepend_it with 0:
indx <- c(0, which(fridays))

And_use period.apply:
period.apply(foo, INDEX=indx,_FUN=last)

Result:
     __  _[,1]
2011-01-07_2993
2011-01-14_2970
2011-01-21 2940
2011-01-28_3075

 Q:

How to_execute_JavaScript after_a_page is transitioned with jQuery Mobile

When_a_page do a transition to another (and_use the location.hash stuff),_this_second page does not_load any JavaScript. How can_I execute JavaScript when a page_is loaded_(if this_one "comes" from a transition from its parent)?
I have page1.html, with_a link to page2.html. This page2.html_loads with a transition_(slide effect_by_default).
In page2.html no_JavaScript_is executed._I tried with a simple
<script type="text/javascript">
alert("x");
</script>

but does_not work._I tried with a lot of_document.ready, bind, live, oncreate,_pagecreate,_and so on.

A:

You could use a_callback function. After the animation call_a function.
in jQuery:
$('#yourElement').animate({
  __opacity:_0.25,
  }, 5000, function()_{
    // Animation_complete. add your_callback logic here
});

If using Webkit transitions:
$('#yourElement').addEventListener(
 'webkitTransitionEnd',
_function(_event ) {
   __// Animation complete. add your callback_logic_here