jquery google chrome
I am using the newest jqueryui and have a link on my homepage that bring a dialog with a form. Now on Firefox, IE and the others no problems. Only on chrome. it just won't work. You click and it's just quiet. 开发者_运维知识库Here is the simple code that gets the dialog:
var diagopt = {
autoOpen: true,
title: 'Get a Quote Sent to you!',
modal: true,
width: 400,
height: 350 } d.each(function(){ //d is a variable holding jquery object
$(this).click(function(eve){
if($(this).attr('id') == links[1]) //array with id of target elements
{
$('#getquote').dialog(diagopt);
return false;
}
Is there anything I am missing or is it one of those css quirks that chrome just doesn't like coming from jqueryui which I see spoken of by some other users here.
Try a semicolon before d.each
and make sure to close your .each(function() {
and .click(function() {
with });
:
var diagopt = {
autoOpen: true,
title: 'Get a Quote Sent to you!',
modal: true,
width: 400,
height: 350 }; // <== semicolon
d.each(function(){ //d is a variable holding jquery object
$(this).click(function(eve){ // <== Note that eve is never used.
if($(this).attr('id') == links[1]) //array with id of target elements
{
$('#getquote').dialog(diagopt);
return false;
}
}); // <== close the .click()
}); // <== close the .each()
精彩评论