Javascript is good boy too !

1443007601000 jQuery

by Start Bootstrap


While developing the TaskManagerApp i am planning it with simple and efficient actions,

I had many wide options for the user to make themself comfort such as choosing the database mode, connection type etc.,

While constructing such things, as i am developing the front end in AngularJs i faced many sweet issues and then gently crossed it with stackoverflow.

And this made me to stuck for a while, i don’t know the reason why Logout menu is not expanding while the original template does.

After few investigation i found the class changes happening over it.. then i made myself to build that functionality.

Its as simple like having and removing the class on click event.

Here’s the way i deal with

function menuSelector() {
if (document.getElementById("tobechanged").className == "dropdown pull-right" ) {
document.getElementById("tobechanged").className = "dropdown pull-right open";
}
else
{
document.getElementById("tobechanged").className = "dropdown pull-right";
}
}

Query summary :

While clicking the Menu , the function menuSelector() will be called, it will check if the id named as ‘tobechanged’ has the class name
‘dropdown pull-right’ (It means the menu is not expanded). if the class name is like than it will be renamed to ‘dropdown pull-right open’
which will make the menu expand..If not it will be again set to ‘dropdown pull-right’

Any Questions ?

I am not sure even if someone is reading it. I am expecting a little question from someone as i made it like that.

Cheers