0

私はウェブサイトのソーシャルメディア部分に取り組んでおり、私の要件により、ユーザーはTwitterウィンドウに使用している背景とテキストの色を変更できます。部分的には達成しましたが、ツイートが動的に読み込まれると、変更をnullにするたびにテキストが読み込まれます。jqueryを使用してfarbtastic.jsを使用して色を追加しましたが、部分的に機能します.APIに適用されるcssの動的な読み込みを回避したり、ツイートの読み込みごとにデフォルトの色を上書きしたりするにはどうすればよいですか??リンクやポインターが役立ちます。これが、ツイートの段落要素にcssを適用する方法です。

    if(container.className == 'tweetCPTrans'){
    $('p').attr('style', 'color:'+fb.color+' !important');      
 }

     twMix = new TWTR.Widget({ version: 4,
     type: 'profile', 
     rpp: 4, 
     interval: 6000, 
     width: w, 
     height: h, 
     theme: { shell: 
      { background: 'none', 
        color: '#4c4c4c' }, 
      tweets: { 
      background: '#none', 
      color: '#4c4c4c', 
     links: '#b30009' } }

ありがとう
サック

4

1 に答える 1

1

これはあなたが望むもののように見えます。

complete : function (tweetBox) {

  me.tweetBox = tweetBox; 

  try {

     me.tweetBox.$editor.css({

        resize : 'none', 

        color : '#9B9B9B', 

        'font-family': 'Arial', 

        'font-size': '14px', 

        border : 'none', 

        background : 'transparent', 

        'border-radius': 0, 

        '-webkit-border-radius': 0, 

        '-moz-border-radius': 0 

     }); 

     me.tweetBox.$button.css( {

        cursor : 'hand', 

        cursor : 'pointer' 

     }); 

  } catch (e) {

     //

  }

}

これはメソッドのcompleteコールバックですtweetbox

于 2012-09-12T03:08:39.353 に答える