html - Can't find the bug in jQuery code -
i have 2 buttons doing same thing. 1 not working , other is. can't find bug...
jquery code:
<script type="text/javascript"> $(document).ready( function () { $(window).load(function () { $('#litext').hide(0); $('#tablebutton').click(function () { $('#litext').show(2000); $('#mercaz').fadeout(); $('#mercaz').css({ 'margin-top': '0' }); $('#mainimg').css({ 'width': '150px', 'height': '150px', 'margin-top': '5px', 'margin-left': '70px' }); $('#textkoteret').css({ 'margin-top': '30px' }); $('#koteret').css({ 'margin-bottom': '10px' }); $('#mercaz').fadein(); $('.tabbable').show(); }); $('#tablebutton2').click(function () { $('#litext').show(2000); $('#mercaz').fadeout(); $('#mercaz').css({ 'margin-top': '0' }); $('#mainimg').css({ 'width': '150px', 'height': '150px', 'margin-top': '5px', 'margin-left': '70px' }); $('#textkoteret').css({ 'margin-top': '30px' }); $('#koteret').css({ 'margin-bottom': '10px' }); $('#mercaz').fadein(); $('.tabbable').show(); }); }); }); </script> html button:
<input type="button" id="#tablebutton" class="btn btn-primary" value="go" onclick=<a href="#tab-711-1" data-toggle="tab"/> <input type="button" id="#tablebutton2" class="btn btn-primary" value="go" onclick=<a href="#tab-711-5" data-toggle="tab"/> i glad if me here. new this.
errors found:
1) in html remove # id. #selector used in css , jquery not in simple html
<input type="button" id="tablebutton" class="btn btn-primary" value="go" onclick=<a href="#tab-711-1" data-toggle="tab"/> 2) onclick=<a href="#tab-711-1" data-toggle="tab"/> doesn't works in html. onclick event handler used run js code not html.
Comments
Post a Comment