1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Javascript is conflicting with navtabs and other stuff on profile page

Discussion in 'XenForo Development Discussions' started by Matthew Hawley, Dec 14, 2013.

  1. Matthew Hawley

    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.

    <script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
    <script type="text/javascript">
        $(function() {
                type: "GET",
                url: "https://api.github.com/users/{$user.customFields.githubapi}/repos",
                dataType: "json",
                success: function(result) {
                    for (i in result) {
                        "<li><a href='" + result[i].html_url + "' target='_blank'>" +
                        result[i].name + "</a></li>"
    <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);
        border-bottom: 1px solid #c0c0c0;
        margin-bottom: 5px;
        font-size: 15px;
    <li id="ourTab" class="profileContent">
        <div class="githubTitle">Repositories </div>
        <div id="repos">
            <ul id="repo_list" ></ul>
        <div id="repo_content">
  2. Chris D

    Chris D XenForo Developer Staff Member

    Try removing this line:

    <script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
    Matthew Hawley likes this.
  3. Matthew Hawley

    Matthew Hawley Well-Known Member

    It worked! Thanks!

Share This Page