Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [JavaScript] Zmiana animacji usuwania elementu
XP'ek
post
Post #1





Grupa: Zarejestrowani
Postów: 263
Pomógł: 9
Dołączył: 3.05.2009
Skąd: Wroc

Ostrzeżenie: (0%)
-----


witajcie chcę dodać opcję znikania do elementu zamykanego poprzez tą funkcję z Twitter bootstrap

tylko nie wiem za bardzo co mam zmienić by działała mi opcja .slideDown(200)
[JAVASCRIPT] pobierz, plaintext
  1. !function ($) {
  2.  
  3. "use strict"; // jshint;_;
  4.  
  5.  
  6. /* ALERT CLASS DEFINITION
  7.   * ====================== */
  8.  
  9. var dismiss = '[data-dismiss="alert"]'
  10. , Alert = function (el) {
  11. $(el).on('click', dismiss, this.close)
  12. }
  13.  
  14. Alert.prototype.close = function (e) {
  15. var $this = $(this)
  16. , selector = $this.attr('data-target')
  17. , $parent
  18.  
  19. if (!selector) {
  20. selector = $this.attr('href')
  21. selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
  22. }
  23.  
  24. $parent = $(selector)
  25.  
  26. e && e.preventDefault()
  27.  
  28. $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
  29.  
  30. $parent.trigger(e = $.Event('close'))
  31.  
  32. if (e.isDefaultPrevented()) return
  33.  
  34. $parent.removeClass('in')
  35.  
  36. function removeElement() {
  37. $parent
  38. .trigger('closed')
  39. .remove()
  40. }
  41.  
  42. $.support.transition && $parent.hasClass('fade') ?
  43. $parent.on($.support.transition.end, removeElement) :
  44. removeElement()
  45. }
[JAVASCRIPT] pobierz, plaintext
Powód edycji: [Ociu]: bbcode
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 22.08.2025 - 13:55