开发者

Button tag not showing in IE7 (JQuery)

Seems to be working in every other browser, but for some reason I can't get the button to show up in IE7.

Here's part of the HTML, CSS and JQuery:

<div class="bookit"><a>Bookable locally</a></div>

    button {
        margin:auto;
        padding:2px 5px 3px 5px;
        font-weight:bold;
    }
    #btnSubmit {
        z-index:1000;
        display:block;
        width:100%;
        height:100%;
        position:absolute;
        margin:auto;
        padding:2px 5px 3px 5px;
        font-weight:bold;
    }
    .bookit a {
        display:none;
    }

<script type="text/javascript">

    $(document).ready(function(){
        $(".bookit").appendTo($("div" + toopen + " > div > div.costs"));

        $("#dp1").appendTo($("div" + toopen + " > div > div.costs > div.bookit"));
        $("#txtAltDate").appendTo($("div" + toopen + " > div > div.costs > div.bookit"));
        $(".ui-datepicker-trigger").appendTo($("div" + toopen + " > div > div.costs > div.bookit")).text("Book now...");

        $('.costsdetails').show();
        $('.bookingdetails').hide();
        $(".excursionSubmitButton").hide();
        return false;
        });

    });

</script>

<script type="text/javascript">

    $('.dropdown a').click(function () { 

        if ($(this).attr("name") == "local") {
            $(".ui-datepicker-trigger"开发者_运维百科).hide();
            $(".bookit").show();
        } else {
            $(".ui-datepicker-trigger").show();
            $(".bookit").hide();
            pickable =  $(this).attr("name").split(",");
             closedDays;
        }

    });

    $(".datepicker").each(function() {

        $(this).datepicker({

            showOn: "button",
            buttonText: "Book now...",
            showWeek: true,
            firstDay: 1,
            onSelect: function(date) { 

            $(this).parent().find('button').text("Change date..."); // Change words on datepicker button

        })

    });

</script>


From what i've experienced with IE is that it doesn't like trailing commas after you close }

Just have a look through your code and make sure that there isn't any.

If not you may need to give us some more information about the javascript error you receive.


in your css you hide

.bookit a

and in the jquery you do

$(".bookit").show();

This should also be

$(".bookit a").show();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜