乌徒帮 › 归档:2012年1月

2012年1月

jquery绑定beforeunload事件

? ? // Bind event to Before user leaves page with function parameter e ? ? $(window).bind('beforeunload', function(e) { ? ? ? ? ? ? // Mozilla takes the ? ? ? ? var e = $('#confirmDialog').dialog('ope... 继续阅读 »

rewind_posts()重置loop

在wordpress主题中,使用rewind_posts();重置文章loop在一些细节上很重要。举一个例子,在文章分类列表页,我们使用is_author()来判断该页是否为作者页,如果是,则我们需要使用the_author()等函数来调用作者信息,但是在调用之前,系统并不会直接赋予该函数对应的作者ID,因为开发文档中说的很清楚,the_author()必须within the loop,必须在l... 继续阅读 »