Side navigation
#11319 closed bug (invalid)
Opened February 10, 2012 01:41PM UTC
Closed February 10, 2012 01:42PM UTC
Incompatibility between 1.6.3 and 1.6.4
Reported by: | davidleonardochacon@gmail.com | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | None |
Component: | misc | Version: | 1.6.4 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
event.layerX and event.layerY are broken and deprecated in WebKit. They will be removed from the engine in the near future.
Hi I use prime faces 3.1 and I need run the follow code:
function getX( oElement )
{
var iReturnValue = 0;
while( oElement != null ) {
iReturnValue += oElement.offsetLeft;
oElement = oElement.offsetParent;
}
return iReturnValue;
}
function rgb2hex(rgb) {
rgb = rgb.match(/^rgb\\((\\d+),\\s*(\\d+),\\s*(\\d+)\\)$/);
function hex(x) {
return ("0" + parseInt(x).toString(16)).slice(-2);
}
return "#" + hex(rgb[1]) + hex(rgb[2]) + hex(rgb[3]);
}
function getY( oElement )
{
var iReturnValue = 0;
while( oElement != null ) {
iReturnValue += oElement.offsetTop;
oElement = oElement.offsetParent;
}
return iReturnValue;
}
$(document).ready(function() {
// Muestra y oculta los menús
$('ul.principal li').hover(
function(e)
{
$("#main svg").remove();
var myItems = []
myItems.push('<svg>');
if ($(this).hasClass('principal li')) {
$(this).find('ul.secundario').css({
display: "block"
});
$(".principal li#idSecundario").each(function(){
if (!($(this).parent().css('display')=='none')){
var color=rgb2hex($(this).css('color'));
myItems.push('<path stroke="' + color +'" stroke-width="1" fill="none" d="M ' + (parseInt($(this).parent().parent().position().left) + parseInt( $(this).parent().parent().innerWidth())) +' '+(parseInt( $(this).parent().position().top) - 6) + ' ' + (parseInt($(this).position().left)) + ' ' + (parseInt($(this).position().top) + 6 ) + '"/>' );
}
});
}
if ($(this).hasClass('secundario li')) {
$(this).find('ul.tercero').css({
display: "block"
});
$(".principal li#idTercero").each(function(){
if (!($(this).parent().css('display')=='none')){
var color=rgb2hex($(this).css('color'));
myItems.push('<path stroke="' + color +'" stroke-width="1" fill="none" d="M ' + (parseInt($(this).parent().parent().position().left) + parseInt( $(this).parent().parent().innerWidth())) +' '+(parseInt( $(this).parent().position().top) - 6) + ' ' + (parseInt($(this).position().left) + parseInt( $(this).innerWidth())) + ' ' + (parseInt($(this).position().top) + 6) + '"/>' );
}
});
}
if ($(this).hasClass('tercero li')) {
$(this).find('ul.cuarto').css({
display: "block"
});
$(".principal li#idCuarto").each(function(){
if (!($(this).parent().css('display')=='none')){
var color=rgb2hex($(this).css('color'));
myItems.push('<path stroke="' + color +'" stroke-width="1" fill="none" d="M ' + (parseInt($(this).parent().parent().position().left) + parseInt( $(this).parent().parent().innerWidth())) +' '+(parseInt( $(this).parent().position().top) - 6) + ' ' + (parseInt($(this).position().left) ) + ' ' + (parseInt($(this).position().top) + 6) + '"/>' );
}
});
}
myItems.push('</svg>');
$('#main').append(myItems.join(''));
},
function(e)
{
$("#main svg").remove();
if ($(this).hasClass('principal li')) {
$(this).find('ul.secundario').css({
display: "none"
});
$('.principal').find('#linea').css({
display: "none"
});
}
if ($(this).hasClass('secundario li')) {
$(this).find('ul.tercero'). css({
display: "none"
});
$('.principal').find('#linea').css({
display: "none"
});
}
if ($(this).hasClass('tercero li')) {
$(this).find('ul.cuarto'). css({
display: "none"
});
$('.principal').find('#linea').css({
display: "none"
});
}
}
);
});
Primeface use 1.6.4 verson but scrit run with http://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js"
I Neet Help
Attachments (0)
Change History (1)
Changed February 10, 2012 01:42PM UTC by comment:1
component: | unfiled → misc |
---|---|
priority: | undecided → low |
resolution: | → invalid |
status: | new → closed |
Thanks for taking the time to try to contribute to the jQuery project but this is not a valid bug. This bug tracker is not a support forum, and is only for solving reproducible, verifiable bugs with jQuery Core itself.
If you require assistance with your code, try asking in the forums, #jquery on Freenode, or on StackOverflow.