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.


iPhone 5 is not displaying the responsive mode of the website correctly

I have created this website, and so far I have not been able to find out why only on certain iPhone phones, the website is not displayed in its responsive mode. (it shows correctly on most iPhone phones).

Here is what I have done so far:

  1. Checked the website on Android devices: it looks good
  2. Check the responsive website on different browsers: it works
  3. Use online iphone simulators to see how the website looks: Shows fine
  4. Cleared browser cache and cookies on iPhone devices that have problem showing the responsive mode: Still no luck

Here is a screen shot of how the website homepage SHOULD look like in iphones.

enter image description here

4

1 回答 1

0

由于其他 jQuery 函数运行良好,可能会发生以下 3 件事之一:

  1. 您正在使用 < 1.3 的 jQuery 版本
  2. 另一个 Javascript 库正在“窃取”$符号,从而产生一些冲突
  3. 在某些时候,您正在覆盖$变量(尝试jQuery使用变量)
于 2013-10-04T16:36:12.367 回答