Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8521197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T06:45:09+00:00 2026-06-11T06:45:09+00:00

I’m using jquery sortable function , but i’m having some problems. My header ‘Name’

  • 0

I’m using jquery sortable function, but i’m having some problems.

My header ‘Name’ ‘Date from’ ‘Date To’ ‘Priority’ is movable, which it shouldn’t be. I can’t drop it anywhere else in the table which also shouldn’t be possible, so that’s fine.

Code for first table:

HTML:

<table id="sort" class="table table-striped table-bordered table-condensed">
    <tbody>
        <tr>
            <th class="cellWidth40"> Name</th>
            <th class="cellWidth20"> Date from </th>
            <th class="cellWidth20"> Date to </th>
            <th class="cellWidth15"> Priority</th>
            <th></th>
        </tr>
    </tbody>
    @foreach (var item2 in Model.ContinuousRouteModels.Where(p => p.Active).OrderBy(p => p.Priority))
    {
        <tr class="priorityRow">
            <td id="tableDragSort">
                @Html.HiddenFor(modelItem => item2.Id, new { @class = "routeIdentifier" })
                @Html.DisplayFor(modelItem => item2.Name)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item2.ValidFrom)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item2.ValidTo)
            </td>
            <td class="routePriority">
                <span>@Html.DisplayTextFor(modelItem => item2.Priority)</span>
            </td>
            <td class="cellWidth5">
                <a href="@Url.Action("Copy", "Route", new { id = item2.Id })"><i class="icon-file" alt="Kopiere rute" ></i></a>
                <a href="@Url.Action("Edit", "Route", new { id = item2.Id })"><i class="icon-edit" alt="Redigere rute"></i></a>
                <a class="deleteLink" href="@Url.Action("DeleteRoute", "Route", new { id = item2.Id })"><i class="icon-trash" alt="Slette rute"></i></a>
            </td>
        </tr>
    }
</table>

JQUERY:

$("#sort tbody").css("cursor", "n-resize");
$("#sort tbody").sortable({
    helper: fixHelper,
    opacity: 0.5,
    update: function(event, ui) {
        updatePriorityTable();
    }
}).disableSelection();

Second table:

“Your routepattern Id Delay”

My other table which should be pretty much the same have a different behavior. The header in this table can be moved, and dropped inside the table. Neither should be possible

Does anyone have any clue whats wrong?

Code for second table:

HTML:

<table id="RoutePatternBusStops" class="table table-striped table-bordered table-condensed" style="width:270px">
                <tbody>
                    <tr>
                        <th style="text-align: left">Your routepattern</th>
                        <th>Id</th>
                        <th>Delay</th>
                    </tr>
                </tbody>
                @foreach (var item2 in Model.RoutePatternBusStops.OrderBy(p => p.Delay))
                {
                    <tr>
                        <td>
                            <input name="RoutePatternBusStops.BusStopId" type="hidden" value="@item2.BusStop.Id">@item2.BusStop.Name
                        </td>
                        <td>
                            @item2.BusStop.Id
                        </td> 
                        <td>
                            <input type="text" style="width: 20px" name="RoutePatternBusStops.Delay" value="@item2.Delay">
                        </td>
                    </tr>
                }

            </table>

JQUERY:

$("#RoutePatternBusStops tbody").css("cursor", "n-resize");
    $("#RoutePatternBusStops tbody").sortable({
        helper: fixHelper,
        opacity: 0.5,
        update: function(event, ui) {

        }
    }).disableSelection();
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T06:45:11+00:00Added an answer on June 11, 2026 at 6:45 am

    Put the headers inside a <thead></thead> insteed of <tbody></tbody>

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I am reading a book about Javascript and jQuery and using one of the
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
We're building an app, our first using Rails 3, and we're having to build
I want to construct a data frame in an Rcpp function, but when I
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
I have just tried to save a simple *.rtf file with some websites and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.