Browse Source

Adds alt tag to search templates, fix for sticky menus in Safari

pull/912/head
jlukic 11 years ago
parent
commit
261d86bc79
3 changed files with 14 additions and 5 deletions
  1. 4
      src/definitions/modules/popup.js
  2. 2
      src/definitions/modules/search.js
  3. 13
      src/definitions/modules/sticky.js

4
src/definitions/modules/popup.js

@ -826,8 +826,8 @@ $.fn.popup.settings = {
context : 'body', context : 'body',
position : 'top center', position : 'top center',
delay : { delay : {
show : 50,
hide : 150
show : 100,
hide : 100
}, },
inline : false, inline : false,
preserve : false, preserve : false,

2
src/definitions/modules/search.js

@ -732,7 +732,7 @@ $.fn.search.settings = {
if(result.image !== undefined) { if(result.image !== undefined) {
html+= '' html+= ''
+ '<div class="image">' + '<div class="image">'
+ ' <img src="' + result.image + '">'
+ ' <img src="' + result.image + '" alt="">'
+ '</div>' + '</div>'
; ;
} }

13
src/definitions/modules/sticky.js

@ -172,6 +172,7 @@ $.fn.sticky = function(parameters) {
element: { element: {
margin : element.margin, margin : element.margin,
top : element.offset.top - element.margin.top, top : element.offset.top - element.margin.top,
left : element.offset.left,
width : element.width, width : element.width,
height : element.height, height : element.height,
bottom : element.offset.top + element.height bottom : element.offset.top + element.height
@ -247,8 +248,8 @@ $.fn.sticky = function(parameters) {
size: function() { size: function() {
$module $module
.css({ .css({
width: module.cache.element.width,
height: module.cache.element.height
width : module.cache.element.width,
height : module.cache.element.height
}) })
; ;
} }
@ -391,6 +392,7 @@ $.fn.sticky = function(parameters) {
bindTop: function() { bindTop: function() {
module.debug('Binding element to top of parent container'); module.debug('Binding element to top of parent container');
$module $module
.css('left' , '')
.removeClass(className.fixed) .removeClass(className.fixed)
.removeClass(className.bottom) .removeClass(className.bottom)
.addClass(className.bound) .addClass(className.bound)
@ -402,6 +404,7 @@ $.fn.sticky = function(parameters) {
bindBottom: function() { bindBottom: function() {
module.debug('Binding element to bottom of parent container'); module.debug('Binding element to bottom of parent container');
$module $module
.css('left' , '')
.removeClass(className.fixed) .removeClass(className.fixed)
.removeClass(className.top) .removeClass(className.top)
.addClass(className.bound) .addClass(className.bound)
@ -414,6 +417,7 @@ $.fn.sticky = function(parameters) {
stickTop: function() { stickTop: function() {
module.debug('Fixing element to top of page'); module.debug('Fixing element to top of page');
$module $module
.css('left', module.cache.element.left)
.removeClass(className.bound) .removeClass(className.bound)
.removeClass(className.bottom) .removeClass(className.bottom)
.addClass(className.fixed) .addClass(className.fixed)
@ -425,6 +429,7 @@ $.fn.sticky = function(parameters) {
stickBottom: function() { stickBottom: function() {
module.debug('Sticking element to bottom of page'); module.debug('Sticking element to bottom of page');
$module $module
.css('left', module.cache.element.left)
.removeClass(className.bound) .removeClass(className.bound)
.removeClass(className.top) .removeClass(className.top)
.addClass(className.fixed) .addClass(className.fixed)
@ -456,6 +461,10 @@ $.fn.sticky = function(parameters) {
module.debug('Reseting elements position'); module.debug('Reseting elements position');
module.unbind(); module.unbind();
module.unfix(); module.unfix();
module.resetCSS();
},
resetCSS: function() {
$module $module
.css({ .css({
top : '', top : '',

Loading…
Cancel
Save