jQuery plugin conflicts - please assist

后端 未结 6 1660
一个人的身影
一个人的身影 2021-01-21 22:18

The aim is to show a form which will update the div on the page with the result

  1. load this [page]
  2. click the linkto show the form
  3. submit the form
6条回答
  •  南方客
    南方客 (楼主)
    2021-01-21 22:55

    As far as I can see you now have:

    but you still call $('#feditform').fadeIn('slow').ajaxForm(options);

    as far as I can see and know about jQuery this will never show up, because the surrounding div is display:none. I suggest to do three things:

    • Do simplify the code first by using hide() and show(), which will avoid trouble with some animations. If this works, you can go on and introduce the animated versions again.
    • Just hide the content on the (document).ready function via jQuery, so you can rely on those functions. We had bad experiences with 'mixed' approaches (hardcoded and via jQuery) especially concerning show and hide situations.
    • Last but not least: Some plugins and environments do make troube using $. We tend to use the keyword jQuery in those situations because this will always keep the scope.

    Hope this helps.

提交回复
热议问题