Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/80.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/77.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
这个jQuery工具提示行为有什么不对?_Jquery_Arrays_Jquery Tooltip - Fatal编程技术网

这个jQuery工具提示行为有什么不对?

这个jQuery工具提示行为有什么不对?,jquery,arrays,jquery-tooltip,Jquery,Arrays,Jquery Tooltip,“编辑当前行为”在悬停时没有显示工具提示。不是默认的html标题或jquery工具提示/编辑 我在网页上有一个日历。当一天有一个事件并且您将鼠标悬停在该事件上时,html标题属性将显示,其中包含以逗号分隔的事件名称。当一天有20个事件时,这将开始看起来很难看,所以我想使用jQuery使这个显示方式有所不同。以下是我的代码,用于显示我在使用$for jQuery时遇到问题的工具提示,因为我不理解页面上其他jQuery脚本之间的冲突内容,键入所有内容似乎都能正常工作: jQuery(function

“编辑当前行为”在悬停时没有显示工具提示。不是默认的html标题或jquery工具提示/编辑

我在网页上有一个日历。当一天有一个事件并且您将鼠标悬停在该事件上时,html标题属性将显示,其中包含以逗号分隔的事件名称。当一天有20个事件时,这将开始看起来很难看,所以我想使用jQuery使这个显示方式有所不同。以下是我的代码,用于显示我在使用$for jQuery时遇到问题的工具提示,因为我不理解页面上其他jQuery脚本之间的冲突内容,键入所有内容似乎都能正常工作:

jQuery(function(){
        var tip = jQuery("#tip");

        //on hover of links with a class of "eventful"
        jQuery(".eventful a").hover(function(e){

            //pull the title attribute into variable "tip"
            tip.text(jQuery(this).attr("title"));

            //make the default title blank
            jQuery(this).attr("title", "");

            //place the new title with css
            tip.css("top",(e.pageY+5)+"px")
                .css("left",(e.pageX+5)+"px")
                .fadeIn("slow");

        }, function() {
                //on mouse out remove
                jQuery("#tip").fadeOut("fast");

                //replace the default title
                jQuery(this).attr("title", tip.html());
        });
    });
这是行不通的,所以我不确定我做错了什么。但是在我得到要显示的工具提示之后,我需要更改多个逗号分隔的事件的显示方式,最好更改为无序列表。我在下面有一段代码,它可能会也可能不会将项目分割成一个数组,在每个逗号处断开字符串:

var titleArray=$.eventful.attrtTitle.split


如果这真的有效,我不知道如何将其纳入ul。在此,非常感谢您的帮助

tip div应该有position:absolute样式&它的z索引应该大于页面中的其他元素。添加jqueryip.css'z-index',一些高值

看起来很完美。你有没有收到任何JS错误。这很有帮助,谢谢。我想我现在的问题是定位。这个div包含在一个小部件区域内,我认为使用pageY和pageX会导致div被定位在小部件区域边界之外,因此不可见。有没有不使用pageY和pageX定位div的方法?我正在使用的网站位于dev.adabible.org,日历位于主页的左下角。感谢您到目前为止的帮助。在重新审视这个问题之后,我意识到我不应该将我的tip div放在我的小部件区域内。我把它放在外面,现在一切都排好了。非常感谢。关于如何将一系列项目转换为无序列表,您有什么建议吗?有!非常感谢你!这非常有效。我只需要做一个改变,那就是把第二个标记变成一个结束标记,因为我得到了一个额外的空列表项显示。再次感谢!