2
$('.sign_in').closest('#page_canvas').css('marginTop','54px');

This line keeps throwing the error:

Uncaught TypeError: Object #<Object> has no method 'closest'

Other jQuery functions are working fine, such as prependTo, remove, insertBefore. Not sure why the 'closest' function is not working. I spent the entire day researching, but found nothing specific. Any clues would be of great help.

Thanks.


Does Twitter Bootstrap 3.0 offer a slide toggle select component?

I am trying to create a slide toggle select component for a mobile app. We are using twitter bootstrap 3.0 for the UI.

I don't see any documentation on bootstrap 3.0 that covers a slide toggle select component. Did they decide not to build that component for 3.0? If so, how can I create one?

I really want to keep using Bootstrap 3.0 for the responsive design elements. And I don't want to weigh my app down by adding jQuery mobile.

4

1 に答える 1

0

他の jQuery 関数は正常に動作しているため、次の 3 つのいずれかが発生している可能性があります。

  1. jQuery バージョン < 1.3 を使用している
  2. 別の Javascript ライブラリがサインを「盗んでいる」$ため、競合が発生しています
  3. ある時点で、変数をオーバーライドしています(代わりに変数を$試してください)jQuery
于 2013-10-04T16:36:12.367 に答える