0

我将 jquery 的 apprise 插件与自动完成功能结合使用。它工作正常,只是显示的下拉列表没有正确显示。我认为这是因为 css 中的 z-index 属性。但是,我相应地改变了它,它没有工作。有没有人对如何制作它有任何想法,以便下拉列表将出现在 apprise 框内?

谢谢,

 $(".link").click(function(){
        apprise("<h1 class='notorious'>Link to what?</h1><div class='team_box' style='background-color:#ffffff;height:165px;'><div style='border-right:solid 1px #e4e4e4;color:#090127;width:200px;float:left;'><input type='radio' id='user' name='user'/> User <br /><input type='radio' id='current_team' name='current_team'/> Current Season Team <br /><input type='radio' id='past_team' name='past_team'/> Past Season Team <br /><input type='radio' id='season' name='season'/> Season <br /><input type='radio' id='current_player' name='current_player'/> Current Season Player <br /><input type='radio' id='past_player' name='past_player'/> Past Season Player <br /><input type='radio' id='all_star' name='all_star'/> All Star Game <br /><input type='radio' id='series' name='series'/> Series <br /></div><div id='belinda' style='float:left;margin-left:15px;'><input type='text' id='shadow' class='bar' style='display:none;'/></div></div>");

        jQuery('input[name=current_team]:radio').click(function(){
            $('#shadow').fadeIn('slow');

            var data = ["Baltimore Orioles", "New York Yankees", "Toronto Blue Jays", "Tampa Bay Rays", "Boston Red Sox", "Kansas City Royals", "Chicago White Sox", "Cleveland Indians", "Detroit Tigers", "Minnesota Twins", "Texas Rangers", "Seattle Mariners", "Oakland Athletics", "Los Angeles Angels", "Philadelphia Phillies", "Atlanta Braves", "New York Mets", "Washington Nationals", "Miami Marlins", "Cincinatti Reds", "Pittsburgh Pirates", "Chicago Cubs", "St. Louis Cardinals", "Houston Astros", "Milwaukee Brewers", "Los Angeles Dodgers", "Colorado Rockies", "Arizona Diamondbacks", "San Francisco Giants", "San Diego Padres"];

            $("#shadow").autocomplete({ 
                source: data
            });
        });
    });
4

1 回答 1

0

z-index 是问题所在。值 10000000000 应该可以工作。

于 2013-01-23T16:28:09.173 回答