Javascript is conflicting with navtabs and other stuff on profile page

Matthew Hawley

Well-known member
So I wrote then addon that fetches a list of a user's github repositores. The addon makes a profile tab.

When Im on my profile, I can open navtab drop down menus, but when I click on something else, the navtab menus dont close. Also I can open multiple navtab menus.

Also recent activity and postings won't load.

Here is a video showing the problems. http://www.screenr.com/cmVH

And here is the code I am using.

Code:
<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script type="text/javascript">
    $(function() {
        $.ajax({
            type: "GET",
            url: "https://api.github.com/users/{$user.customFields.githubapi}/repos",
            dataType: "json",
            success: function(result) {
                for (i in result) {
                    $("#repo_list").append(
                    "<li><a href='" + result[i].html_url + "' target='_blank'>" +
                    result[i].name + "</a></li>"
                    );
                  
                }
             
            }
        });
});
    </script>

<style type="text/css">
#repos { border: 1px solid #e6e6e6; }

ul #repo_list li
{
    font-size: 11pt;
    background: rgb(241, 241, 241) url('styles/default/xenforo/gradients/category-23px-light.png') repeat-x top;
    padding: 10px;
    border-bottom: 1px solid rgb(221, 221, 221);
}

.githubTitle
{
    border-bottom: 1px solid #c0c0c0;
    margin-bottom: 5px;
    font-size: 15px;
}
</style>

<li id="ourTab" class="profileContent">

    <div class="githubTitle">Repositories </div>
   
    <div id="repos">
        <ul id="repo_list" ></ul>
    </div>
    <div id="repo_content">
   
    </div>
</li>
 
Back
Top Bottom