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

  • Home
  • SEARCH
  • 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 8092603
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T20:19:16+00:00 2026-06-05T20:19:16+00:00

see fiddle i have html table and one textbox and one button.make cell selection

  • 0

see fiddle

i have html table and one textbox and one button.make cell selection by dragging on cell .on click of button i am getting value of textbox and put into span tag of cell. i have to disble click on minute cell 0,15,30,45. In fiddle u see when i click on minute cell then it makes css green and css length is incremented (those chking in alert).

  • 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-05T20:19:17+00:00Added an answer on June 5, 2026 at 8:19 pm

    Is this what you want ?

    –EDITED–

    Now you can only highlight in a straight way (up or down).
    Probably there is a more elegant way to do all of this but i think this will works as you want

    DEMO: http://jsfiddle.net/vrW2n/9/

    // Add this variable    
    var lastRow = 0;
    

    In mousedown():

        // This line gets the index of the first clicked row.
        lastRow = $(this).closest("tr")[0].rowIndex;
    
        active = true;
        $(".csstdhighlight").removeClass("csstdhighlight"); // clear previous selection
    
        //This is the big trick
        $(".temp_selected").removeClass("temp_selected");
    ...
    

    And in mousemove():

    ...
        /* Begin my edit
        Compares the actual 'mousemove' row index
        with the last and next row index
        */
        var thisRow = $(this).closest("tr")[0].rowIndex;
    
        if( lastRow == thisRow || lastRow == thisRow - 1 || lastRow == thisRow + 1 ){
            lastRow = $(this).closest("tr")[0].rowIndex;
        }else
            return;
        // End my edit
    ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

see fiddle Firstly i am new to jquery. i have to make one cell
You can see the fiddle here: http://jsfiddle.net/easeS/4/ Here is the html/css I have: #main
I have a menu with tiled images w/text under them. See Fiddle: http://jsfiddle.net/techydude/GF8tS/ Is
I have following fiddle: http://jsfiddle.net/BFSH4/ As you see there are two issues: The h1
I have the following fiddle for people to see http://jsfiddle.net/defaye/DhaHP/4/ The result on full
see fiddle if patient has time slot alloted already then make color yellow using
see fiddle I want to drag the mouse on cell and whatever is under
I have a table of values and need to get the value of a
I have some HTML code. Here is a link to a fiddle with a
I have a HTML table like the below; <table style=width: 100%> <tr> <td style=width:

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.