jQuery

17K

Solutions

5K

Contributors

jQuery (Core) is a cross-browser JavaScript library that provides abstractions for common client-side tasks such as Document Object Model (DOM) traversal, DOM manipulation, event handling, animation and Ajax. jQuery also provides a platform to create plugins that extend jQuery's capabilities beyond those already provided by the library.

Share tech news, updates, or what's on your mind.

Sign up to Post

Hi,

I'm having problem sending "Json" data to a text editor

Can you please help?

 $("#SelectAFunctionFromList").change(function (event) {
            debugger;
            var GetValue = $(this).val();
            $('#HiddenFieldForSelectedFunctionID').val(GetValue);
            //reset select group
           // $('#FunctionTextArea').val("");
            var method = $('#FunctionPartialViewForm').attr("method").toLowerCase();
            var action = $('#FunctionPartialViewForm').attr("action");
            var data = $('#FunctionPartialViewForm').serialize();
            $.ajax({ method: method, url: action, data: data }).done(
                function (json) {

                  //Here I want to send my json data to my text editor called "FunctionTextArea" 
                    alert(json);
                    editor .value =  $("#FunctionTextArea").val(json);


                });
        });




      jQuery(function () {
            var editor = new Jodit("#FunctionTextArea");
        });

Open in new window

0
Exploring ASP.NET Core: Fundamentals
LVL 19
Exploring ASP.NET Core: Fundamentals

Learn to build web apps and services, IoT apps, and mobile backends by covering the fundamentals of ASP.NET Core and  exploring the core foundations for app libraries.

Hi,

i want to replace \n with </br>


 My original code is this: 

      var text = $("#ContidionsAndAttributesTextArea").val());
            alert(text); 
            editor.value = editor.value + text;


but I want to replace \n with <br/> 

            var text = $("#ContidionsAndAttributesTextArea").val().replace("\n", "<br />", "g");     //it's only replacing the first \n but not any \n found in the field
            alert(text); 
            editor.value = editor.value + text;

Open in new window


my output text is this:

"<br />IF Dx <> Dx2 (1237)  \n AND Px Range (22 - 333) "

It replace my first \n with <br> but not the second \n
0
Hi,
I have a main form displaying data.  Then I have a "Comments" link on each row and on the click of it a partial view with a table opens up.  The partial view is to view/add comments and other data.  In this partial view, after the table, there are textboxes I can fill with data.  After adding data I click on "Add" and when I am done I would click on "Save" and whatever I typed in the textboxes is entered in the database.  This all works and gives you an idea of what I am working with(see attached pics as well).  

What I am looking for now is a way to fill the Ticket Number textbox(on the partial view) with the number from the Number field(on main form).  Also, this number should not be edited on the partial.  How can I achieve that?

I have been unable to find a solution.  Please help.  Thank you.

THIS IS THE CODE IN THE CONTROLLER:
//VIEW ALL COMMENTS AND DISPLAY IN PARTIAL
        [HttpPost]
        public ActionResult ViewComments(int ticketNum)
        {
            List<Comment> AllComments = new List<Comment>();
            using (DBModel db = new DBModel())
                AllComments = db.Comments.Where(x => x.TicketNumber == ticketNum).ToList();

            return PartialView("ViewComments", AllComments);
        }


//INSERT COMMENT
        public JsonResult InsertComments(List<Comment> commentsArray)
        {
            using (DBModel db = new DBModel())
            {
                //Truncate Table to delete all comments. 

Open in new window

0
Hello,

How can I transfer data from the dialog box to the parent window?

I need your help.

I have a parent window and a popup window

1. user open popup window
2. the popup window has a textarea
3. the values that are in the textarea needs to go back to the parent textarea.

I don't know what I'm doing wrong.

Text area in the parent window: 

 @Html.TextArea("ConditionAttributesAndValues", new { @class = "form-control", @style = "width:77%" })

My dialog box in the parent window:

$(function () {
            $('#dialog').dialog({
                autoOpen: false,
                width: 950,
                height:650,
                resizable: true,
                title: 'Condition',
                modal: true,
                open: function(event, ui) {
                    $(this).load("@Url.Action("RulePartialView", "CareAdvanceBusinessRules")")
                    $(".ui-dialog-titlebar-close").hide();
                },
                buttons: {
                    "Close": function () {
                        $(this).dialog("close");
                    }
                },
                closeOnEscape: false,
            });
            $("#opener").click(function (event) {
                event.preventDefault(); 
                $("#dialog").dialog("open");
            });
        });

Open in new window


This is what I have in the dialog box: 

// Here where I need the help 
// I want what ever I have in the textarea to be sent to the parent textarea. 

     $("#AppendConditionToParentBtn").click(function () {
            $('#ContidionsAndAttributesTextArea').text(window.opener.$("#ConditionAttributesAndValues").val());
            $('#dialog').dialog('close');
            return true;
        });

 <button id="AppendConditionToParentBtn" name="AppendConditionToParentBtn" class="btn btn-default" type="button" style="margin-top:10px;margin-bottom:10px;" value="Append">
                        Submit 
                    </button>

Open in new window


I'm getting this error

Unhandled exception at line 513, column 13 in eval code

0x800a138f - JavaScript runtime error: Unable to get property '$' of undefined or null reference
0
Hi,

How can I say if the dropdown list has been selected then append the value or the text to the textarea box.

I'm using bootstrap dropdown list.

  $("#AppendConditionBtn").click(function () {

            var RangeBoxFrom = $("#RangeBoxFrom").val().length;
            var RangeBoxTo = $("#RangeBoxTo").val().length;
            var GetOperatorSelectValue = $("#OperatorSelect option:selected").val();
            var GetConditionSelectValue = $("#ConditionSelect option:selected").text();
            var GetValueSelectValue = $("#ValueSelect option:selected").val();
            var GetGroupSelectValue = $("#GroupSelect option:selected").text();
            var GetItemsTextAreaValue = $("#ItemsTextArea").val();
            var GetOperatorSelectForRangeValue = $("#OperatorSelectForRange option:selected").val();
            var GetConditionSelectForRangeValue = $("#ConditionSelectForRange option:selected").val();
            var GetValueSelectForRangeValue = $("#ValueSelectForRange option:selected").val();
            var GetRangeBoxFromValue = $("#RangeBoxFrom").val();
            var GetRangeBoxToValue = $("#RangeBoxTo").val();

             if (RangeBoxFrom > 6 || RangeBoxTo > 6) {
                 alert("Range should be less than 6 character");
                 return false;
             }

// Here how can I say if the multiselectbox list has been selected then append the value or text to the "ContidionsAndAttributesTextArea"
otherwise don't append. 

        

Open in new window

0
Hi team! I need a JQuery solution to do the following:

When you click on a link to a page, a popup comes up with instructions: "If you don't have access to this resource click here (link option A), if you have access click (option b)". This 'popup' also has a checkbox option "Never show this again", with the obvious result if they click on that option.

*The option to never show again should work only when they check the box and click on Option B (unless you have a better way). Once the option to never see again has been chosen, then clicking on the original link will ignore the code and take them directly to the desired page.

Thank you very much!
0
I am in the process of creating a rock solid secure image upload system for a website I am working on.

Naturally, I want to do client side checks to validate the image file (jpg or png), before I upload it for further checks to the server (using php) - and I assume for that I will use Javascript.

I know there is quite a lot to take into consideration here, so I'm taking it one step at a time.

My question is this, SHOULD I be using jquery for the client side image verification or vanilla javascript.

I know jquery is just javascript ultimately, but I have a propensity to do this with vanilla javascript. Personally I think vanilla javascript 'reads' better as code than jquery. I would also assume it's actually faster at execution.

Online, there is almost no useful information about vanilla javascript with regards to secure image file validation (there are snippets here and there I know) - but there is lots of information about jquery. I am the sort of person who likes to do things 'raw'. So that I can understand fully what my code is doing without any wrapper.

Am I missing something? Is jquery really great at something I'm not understanding? I see jquery code, and the equivalent javascript code, and don't really understand why people are so 'into' jquery. The code lengths are generally similar, and am personally not afraid of coding a bit more if that's what it takes.

I think part of it might be that jquery is all over the internet, and vanilla …
0
Hi,

my Group select is not triggering my on change event.

1. I have a select dropdown list that select px or dx .....
2. Upon selecting from the first dropdown list the Group select will get populated with a list of dx or px.....
3. ounce the user select from the list of dx or px I need to populate the textarea with the list Item.
but for some reason my Group Select is not triggering my on change event to send the data to the textarea called ItemsTextArea

<script>
    $(document).ready(function () {

       // debugger;

        $('#OperatorSelect').multiselect(getOperatorOptions(true));
        $('#ConditionSelect').multiselect(getOperatorOptions(true));
        $('#ValueSelect').multiselect(getOperatorOptions(true));
        $('#GroupSelect').multiselect(getGroupOptions(true));


        $("#ConditionSelect").change(function (event) {
            var GetValue = $(this).val();
            $('#HiddenFieldForSelectedCondition').val(GetValue);
            var method = $('#RulePartialViewForm').attr("method").toLowerCase();
            var action = $('#RulePartialViewForm').attr("action");
            var data = $('#RulePartialViewForm').serialize();
            $.ajax({ method: method, url: action, data: data }).done(
                function (json) {
                    var arr = [ '<option>Select</option>' ];
                    $.each(json, function (i, obj) {
                        arr.push('<option value="' + json[i].Value + '">' + json[i].Text

Open in new window

0
I have a page with a sticky header, when you scroll down, but it gets in the way.
http://arkiteks.us/ARK/Shop/ShopDonate/ShopDonate.aspx

Can anyone help me fix this, so it stays at the top of the page content and doesn't be on top of content so I can read the content?

example
Thanks!
0
Hi,

This is driving me crazy and I need your help please.

1. I have a dropdown list that has list such as px, dx....
2. I have another dropdown list that gets populated based on the first dropdown list
so if the user select from the first dropdown list px the second dropdown list should get populated with the list of px codes

the problem is when I inspect the element on the second dropdown list I do see my list getting populated and changing upon a different selection
but the issue is I don't see the changes on the bootstrap dropdown list.

This is what I have:

 $('#GroupSelect').multiselect(getGroupOptions(true));       //If I remove this code and the code below it will work but without the style 

        $("#ConditionSelect").change(function (event) {
            var GetValue = $(this).val();
            $('#HiddenFieldForSelectedCondition').val(GetValue);
            var method = $('#RulePartialViewForm').attr("method").toLowerCase();
            var action = $('#RulePartialViewForm').attr("action");
            var data = $('#RulePartialViewForm').serialize();
            $.ajax({ method: method, url: action, data: data }).done(
                function (json) {
                    $('#GroupSelect').empty();
                    $('#GroupSelect').append($('<option>').text("Select"));
                    $.each(json, function (i, obj) {
                        $('#GroupSelect').append($('<option>').text(json[i].Text).attr('value', 

Open in new window

0
OWASP: Threats Fundamentals
LVL 19
OWASP: Threats Fundamentals

Learn the top ten threats that are present in modern web-application development and how to protect your business from them.

Hi,

I have a dropdown list on my partial view dialog box

If I remove the class from the <select> and remove the multiselect

my data will get populated but I need to have my style and populate my data

so if I remove from my select this class:
class="btn btn-default dropdown-toggle"
and
remove the multselect function:
//    $('#GroupSelect').multiselect(getGroupOptions(true));

then my select box will get populated but I need my style
how can I have my style and populate my dropdown list?

<script >
    $(document).ready(function () {

        $('#GroupSelect').multiselect(getGroupOptions(true));


   function getGroupOptions(isFilter) {
            return {
                enableFiltering: isFilter,
                enableCaseInsensitiveFiltering: isFilter,
                filterPlaceholder: 'Search ...',
                nonSelectedText: 'Check an option!',
                numberDisplayed: 1,
                maxHeight: 600,
                buttonWidth: '350px'
               
            }
        }


        $("#ConditionSelect").change(function (event) {
           // event.preventDefautlt();
            var GetValue = $(this).val();
            $('#HiddenFieldForSelectedCondition').val(GetValue);
            var method = $('#RulePartialViewForm').attr("method").toLowerCase();
            var action = $('#RulePartialViewForm').attr("action");
            var data = $('#RulePartialViewForm').serialize();
            $.ajax({ method: method, 

Open in new window

0
I am a little inexperienced with console error messages.  How can I resolve "You have 3 errors on your page  uncaught SyntaxError: Unexpected token '<'" on this page: https://www.gopherstateevents.com/results/cc_rslts/relay_rslts.asp?meet_id=637&race_id=3175

Thank you!
1
Hi,

How can I send back my model info to the dialog box ounce I submitted its form.
right now it's asking me to save json file after my submission

         [HttpPost]
        public JsonResult RulePartialView(CABRRulePartialViewModel model)
        {
            model.SelectGroupDataListSource = _careAdvanceBusinessRulessService.GetGroupse();
            model.SelectGroupDataSource = _careAdvanceBusinessRulessService.SelectedDataFromGroup(model.HiddenFieldForSelectedCondition);

            Thread.Sleep(1000);
            return Json(model, JsonRequestBehavior.AllowGet);
}

Open in new window



my dialog box partial view


@model BCUW.Model.CABusinessRules.CABRRulePartialViewModel




<script >
    $(document).ready(function () {

        debugger;

        $('#OperatorSelect').multiselect(getOperatorOptions(true));
        $('#ConditionSelect').multiselect(getOperatorOptions(true));
        $('#ValueSelect').multiselect(getOperatorOptions(true));
        $('#GroupSelect').multiselect(getGroupOptions(true));

        
        $("#ConditionSelect").change(function () {
            var GetValue = $(this).val();
            $('#HiddenFieldForSelectedCondition').val(GetValue);
            
            $('#RulePartialViewForm').submit();
        });


        function getOperatorOptions(isFilter) {
            return {
                buttonWidth: '170px'
            }
        }


        function getGroupOptions(isFilter) {
            return {
                

Open in new window

0
Hi, when I click on link "Comments" a modal popup opens up and shows content, therefore it does what it is supposed to.
 
Going to my issue:
In the first scenario, it happens what I want but some other code does not get implemented. In this case, I place the "@section" inside Index.cshtml and the modal popup is rendered in the middle of the page with some styling(which is what I want),  but the datatable and yadcf code above the @section does not seem to get executed(datatable filters not there).  I show this scenario in jpeg attached called "Modal Popup Centered".

On the other hand, in the second scenario, if I put the @section inside the "ViewAll" view the datatable works correctly, the modal popup come up as well, but it does not get the rest of the functionalities(like being centered and the style).  I show this second scenario in the jpeg called "Modal Popup Not Centered".

I would like to leave the code in the ViewAll view(second scenario) as this is the one related to the modal popup.  Also, when I do that the attached error comes up.  I looked the error up and it seems there may be some incompatibility?  If so, why would it work on the index page then?

Could you please help?  I spent lots of time trying to resolve the issue but was unsuccessful.

THIS IS THE LAYOUT VIEW CODE:
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>@ViewBag.Title 

Open in new window

0
Hi,

my dialog box has the word "close" on top right
 
how can I remove it?

Thanks,


  $(function () {
            $('#dialog').dialog({
                autoOpen: false,
                width: 800,
                height:600,
                resizable: true,
                title: 'Product',
                modal: true,
                open: function(event, ui) {
                    $(this).load("@Url.Action("RulePartialView", "CareAdvanceBusinessRules")");
                },
                buttons: {
                    "Close": function () {
                        $(this).dialog("close");
                    }
                }

            });
            $("#opener").click(function (event) {
                event.preventDefault(); 
                $("#dialog").dialog("open");
            });
        });

  <div id="dialog" title="Basic dialog"> </div>

    <a id="opener" href="@Url.Action("RulePartialView", "CareAdvanceBusinessRules")">Click to open popup window </a>

Open in new window

0
Hi,
When I click on my link, it takes me to a whole new page instead of opening my partial view page in a popup window.
I’m not sure what I’m doing wrong can you please take a look and let me know
Thanks,


Controller: 
      public ActionResult RulePartialView()
        {
            CABRRulePartialViewModel model = new CABRRulePartialViewModel();

            return PartialView(model);
        }

Open in new window


Index page: 

    $(document).ready(function () {
$(function () {
            $('#dialog').dialog({
                autoOpen: false,
                width: 400,
                height:500,
                resizable: false,
                title: 'Product',
                modal: true,
                open: function(event, ui) {
                    $(this).load("@Url.Action("RulePartialView", "CareAdvanceBusinessRules")");
                },
                buttons: {
                    "Close": function () {
                        $(this).dialog("close");
                    }
                }
            });
            $("#opener").click(function () {
                $("#dialog").dialog("open");
            });
        });

  });


    <div id="dialog" title="Basic dialog"> </div>

    <a id="opener" href="@Url.Action("RulePartialView", "CareAdvanceBusinessRules")">Click to open popup window </a>

Open in new window


Partial view page 

@model BCUW.Model.CABusinessRules.CABRRulePartialViewModel

<p>hello this is the partial view page</p>

Open in new window

0
Experts,

I am trying to execute a simple script after a jQuery Mobile tab loads. The jQuery Mobile docs say that jQuery Mobile tabs are an extension of jQuery UI tabs and as such, the same code to invoke a function after a jQuery UI tab loads would work in the mobile framework.

Example:

$("#tabs").tabs({
    beforeLoad: function(event,ui){
        ui.jqXHR.fail(function(){
            ui.panel.html("Unable to load tab. Please try again.");
        });
    },//END FUNCTION
    load: function(event, ui){
        alert('I AM A CUSTOM FUNCTION');
    }//END LOAD
});

When I try to run this code, nothing happens when I click on each tab? What am I missing? My tab structure follows the same structure pulled from the jQuery Mobile site:

<div data-role="tabs" id="tabs">
  <div data-role="navbar">
    <ul>
      <li><a href="#one" data-ajax="false">one</a></li>
      <li><a href="#two" data-ajax="false">two</a></li>
      <li><a href="ajax-content-ignore.html" data-ajax="false">three</a></li>
    </ul>
  </div>
  <div id="one" class="ui-body-d ui-content">
    <h1>First tab contents</h1>
  </div>
  <div id="two">
    <ul data-role="listview" data-inset="true">
        <li><a href="#">Acura</a></li>
        <li><a href="#">Audi</a></li>
        <li><a href="#">BMW</a></li>
        <li><a href="#">Cadillac</a></li>
        <li><a href="#">Ferrari</a></li>
    </ul>
  </div>
</div>
0
I use data tables to display results of races that we time on a classic asp website (https://www.gopherstateevents.com/results/fitness_events/results.asp?event_type=5&event_id=883&race_id=1516).  This weekend the results of one of our bigger races showed a Data Table error until I figured out that one person's name was incorrectly entered, with a "/" inserted (ie: Johns/on).  There were no issues in the way the results were calculated and displayed everywhere except in our data tables.

Here is my question:  Are there other characters that will prevent JQuery data tables rendering?  Also, should I build some error trapping in to prevent these characters (ie: Replace(FirstName, "/", "").  Seems like a lot of processing for something that is so unlikely to happen?

Thanks in advance.
0
i have one problem one dropdown is there for example dropdown having 2 values A and B
if i select A it works normally and go to the controller but if i select B one more dropdown
open in the same page . please help me out on this.
0
Become a Certified Penetration Testing Engineer
LVL 19
Become a Certified Penetration Testing Engineer

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

I have two multiple select2 drop down lists on two different pages.

One has a width set for the placeholder, and the other does not when I do an inspect, but I copied the code setup for the first to the second and can't find anywhere that an actual width is being set. The failing one has the width set to 0. The successful one has the width set to 288. But I find 288 no where in my code.

<input class="select2-search__field" type="search" tabindex="0" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="textbox" aria-autocomplete="list" placeholder="[Select]" style="width: 0px;">

Open in new window


both use the exact same method:

$('.ddlSelectMultiple').select2({
placeholder: '[Select]',
allowClear: true,
matcher: function (params, data) {
    return matchStart(params, data);
    },
width: 'resolve',
allowClear: true,
multiple: true,scrollAfterSelect: false,closeOnSelect: false
});

Open in new window


Any ideas where I can find where that width is set? When I create each method, the width is set to 'resolve'

thanks!
0
In my MVC project I created a tab called "Knowledge". I was finally able to make some things work. I implemented a YADCF datatable on it but it is not working. The datatable features appear to be there but not the yadcf. I included the code below and the images of the three errors I get in the console. Please help, thank you!

Here is my code:

       
@model IEnumerable<HelpDeskSupport.Models.KnowledgeBaseModel>

    @{
    Layout = null;
    }

<!DOCTYPE html>

<head>
    
    <script src="~/Scripts/jquery-3.4.1.min.js"></script>
    <script src="~/yadcf-master/jquery.dataTables.yadcf.css"></script>
    <script src="~/yadcf-master/jquery.dataTables.yadcf.js"></script>
    <script src="~/DataTables/datatables.css"></script>
    <script src="~/DataTables/datatables.js"></script>

    <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/themes/base/jquery-ui.css" rel="stylesheet" type="text/css" />
    <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>

    </head>
    <table class="display table table-striped table-bordered" id="knowledgeTable">
    <thead>
        <tr>
            <th>
                @Html.DisplayNameFor(model => model.KBSubject)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.KBFrom)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.KBAssignedTo)
            </th>
            <th>
                

Open in new window

0
How do I create a custom theme in select2?

I've googled results on using different themes, but not found how to create one.

I found this that uses one:
https://codepen.io/techhysahil/pen/qbrqWG

It contains this code:
$flat-theme-light-color : #48c9b0;
$flat-theme-dark-color : #16a085;

Open in new window


And uses this code to useit:
.select2-container--open .select2-dropdown--below,
.select2-container--open .select2-dropdown--above{
  background: $flat-theme-light-color;
}
.select2-container--flat{
  .select2-container--focus .select2-selection--multiple{
    border: 1px solid $flat-theme-dark-color;
  }

Open in new window


But I have questions..
If I wrap any element with:
.select2-container--MyCustomTheme{

Open in new window


I tried this:
I put this on my page:
<script type="text/javascript">
    $(".js-example-theme-multiple").select2({
        theme: "multiplecheckboxes"
    });
</script>

Open in new window


Then in my CSS, I wrapped the element with the theme container so that it would only be triggered for multiple select2s:
.select2-container--multiplecheckboxes{

/*Styles for Multi-select Checkboxes*/
/*https://codepen.io/lenamtl/pen/VwwWYzb*/
.select2-results__option:before {

Open in new window


But that doesn't work. It fails to hit that code.

Any ideas on how to create and use a custom theme so that my single selection looks different than a multi selection?

thanks!
0
Hi,

I have a button on a tab that when clicked opens a modal form but when I enter data in the textboxes it does not get saved to the database.  The javascript object(taskObj) from the code below gets filled with the data entered but when it reaches the controller and I hover over "ItTask" it does not contain any data.    Consequently, when I let the code run I get an error when it tries to run the stored procedure. What am I doing wrong?  Extra info:  the view was added from "ItTask" actionresult.  Please help.  Thank you.

CONTROLLER:

public ActionResult ItTask()
        {
            return View();
        }

        //Add IT Task
        //public JsonResult AddTask(ITTasksModel ItTask)
        public ActionResult AddTask(ITTasksModel ItTask)
        {
            HelpDeskDBHandle hdDB = new HelpDeskDBHandle();
            hdDB.AddTaskIT(ItTask);
            //return Json(hdDB.AddTaskIT(ItTask), JsonRequestBehavior.AllowGet);
            return View();
        }

        //List IT Tasks
        public JsonResult ListITTasks()
        {
            HelpDeskDBHandle hdDB = new HelpDeskDBHandle();
            return Json(hdDB.GetITTasksList(), JsonRequestBehavior.AllowGet);
        }

Open in new window



VIEW:

@model HelpDeskSupport.Models.ITTasksModel

@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>It Tasks</title>

    <script 

Open in new window

0
Hi Experts,
 @Html.FacetDropDownList("ID", Model.ID, new { @class = "special-dropdown", title = T("Select a student").Text })

Open in new window


Is there anyway I can access this title in jquery?

Thanks in advance!
0
Hi,
In my MVC project I created a tab called "Knowledge" (attached is the data is showing as of now). I implemented a YADCF datatable on it but it does not get implemented.  What is the mistake I am making?  I could not find a solution on my own nor online and I seem to do everything correctly.  Attached is shown the tab in question. I also included the code below.  Please help, thank you!

Here is my code:Datatable-Look.jpg
@model IEnumerable<HelpDeskSupport.Models.KnowledgeBaseModel>

@{
    Layout = null;
}

<!DOCTYPE html>

<head>

    <link rel="stylesheet" type="text/css" href="http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/css/jquery.dataTables.css">
    <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/themes/base/jquery-ui.css" rel="stylesheet" type="text/css" />
    <link href="jquery.datatables.yadcf.css" rel="stylesheet" type="text/css" />

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
    <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js"></script>
    <script type="text/javascript" charset="utf8" src="http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/jquery.dataTables.min.js"></script>
    <script src="jquery.dataTables.yadcf.js"></script>

    <style>
        .label {
            padding: 0px 10px 0px 10px;
            border: 1px solid #ccc;
            -moz-border-radius: 1em; /* for mozilla-based browsers */
            

Open in new window

0

jQuery

17K

Solutions

5K

Contributors

jQuery (Core) is a cross-browser JavaScript library that provides abstractions for common client-side tasks such as Document Object Model (DOM) traversal, DOM manipulation, event handling, animation and Ajax. jQuery also provides a platform to create plugins that extend jQuery's capabilities beyond those already provided by the library.

Related Topics