test/rails_root/public/javascripts/jquery/jquery.tips.js in muck-activities-0.1.26 vs test/rails_root/public/javascripts/jquery/jquery.tips.js in muck-activities-0.1.27
- old
+ new
@@ -1,7 +1,7 @@
jQuery(document).ready(function() {
- jQuery(".tip-field").focus(function() {
+ jQuery(".tip-field").live('focus', function() {
jQuery(".active").removeClass("active");
var tip_key = jQuery('#' + this.id).siblings('.tip-key');
var control_id = this.id;
var help_id = this.id;
var field = jQuery('#' + this.id);
@@ -10,15 +10,20 @@
help_id = field.siblings('.tip-id').html();
}
var tip_text = field.siblings('.tip-text').html();
var tip_title = field.siblings('.tip-title').html();
var tip_position = field.siblings('.tip-position').html();
+ if(tip_text == null){
+ tip_text = field.parent().siblings('.tip-text').html();
+ tip_title = field.parent().siblings('.tip-title').html();
+ tip_position = field.parent().siblings('.tip-position').html();
+ }
if (!tip_position) { tip_position = 'right'; }
show_tip(control_id, tip_title, tip_text, tip_position);
jQuery("#" + help_id + "-container").addClass("active");
});
- jQuery(".tip-field").blur(function() {
+ jQuery(".tip-field").live('blur', function() {
jQuery('#' + this.id + '-tip').hide(1);
});
});
function show_tip(object_id,title,tip_text,position) {
\ No newline at end of file