When adding two or more functions in my jquery script file the function/s stops working.
It's working perfectly fine when I've only written one function. But when I'm adding a second one both of them stops working.
I've added a JSFiddle of my code: http://jsfiddle.net/b966e9ae/
function accordion() {
$('.content').accordion({active: 'false', collapsible: 'true'});
}
function slide() {
$('#btnClick').click(function(){
$('.box').toggle('slide', {direction: 'left', 1000});
});
}
$(document).ready(function(){
accordion();
slide();
});
div.box {
width: 200px;
height: 200px;
background-color: red;
}
button#btnClick {
position: absolute;
top: 200px;
left: 500px;
}
h1 {
background-color: #bbb;
border: 1px solid #999;
outline-color: #999;
}
<div class="content">
<h1>Rubrik 1</h1>
<div class="info">
<p>Detta är lite info</p>
<ul>
<li>Info 1</li>
<li>Info 2</li>
<li>Info 3</li>
</ul>
</div>
<h1>Rubrik 2</h1>
<div class="info">
<ul>
<li>Sked</li>
<li>2xTomater</li>
<li>1xKryddmått</li>
</ul>
</div>
<h1>Rubrik 3</h1>
<div class="info">
<p>Detta</p>
<p>är</p>
<p>Schysst!</p>
</div>
<h1>Rubrik 4</h1>
<div class="info">
<p>Detta</p>
<p>är</p>
<p>Schysst!</p>
</div>
</div>
<div class="box">
</div>
<button id="btnClick">Click me</button>
Calling this async Web Method, I get a 500 error. Are there other ways to call a web method async? Stacktrace: Server Error in '/' Application. Unknown web method SendMessage. Parameter name: ...
Calling this async Web Method, I get a 500 error. Are there other ways to call a web method async? Stacktrace: Server Error in '/' Application. Unknown web method SendMessage. Parameter name: ...
Why I ask an easy question: Hi, lots of people asked how to split an string in javascript by multiple values, but I don't understand how it works the /[^\w\s]|_/ in the split asked, so I don't know ...
Why I ask an easy question: Hi, lots of people asked how to split an string in javascript by multiple values, but I don't understand how it works the /[^\w\s]|_/ in the split asked, so I don't know ...
Used libraries: jquery-ui-1.9.1 and jquery-1.8.2 I have one widget with some function called from destroy $.widget("my.customwidget", { options: { }, _destroy: function () { ...
Used libraries: jquery-ui-1.9.1 and jquery-1.8.2 I have one widget with some function called from destroy $.widget("my.customwidget", { options: { }, _destroy: function () { ...
I'm developping an angularjs (v1.2.26) application. And I used KeePass (v2.28), chromeIPass 2.6.8 (google chrome extension) to fill credentials. I got an issue with the login form: Keepass allow to ...
I'm developping an angularjs (v1.2.26) application. And I used KeePass (v2.28), chromeIPass 2.6.8 (google chrome extension) to fill credentials. I got an issue with the login form: Keepass allow to ...