Author Topic: In Render allow jQuery object to be returned  (Read 264 times)

jplevene

  • Pro Ultimate
  • Full Member
  • *
  • Posts: 126
    • View Profile
In Render allow jQuery object to be returned
« on: May 02, 2024, 12:55:27 am »
In the colModel>render allow jQuery to be returned and not just a string for the content.


paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6298
    • View Profile
Re: In Render allow jQuery object to be returned
« Reply #1 on: July 31, 2024, 04:20:17 pm »
What's the use case and benefit of allowing return of jQuery.

jplevene

  • Pro Ultimate
  • Full Member
  • *
  • Posts: 126
    • View Profile
Re: In Render allow jQuery object to be returned
« Reply #2 on: October 29, 2024, 11:22:26 pm »
I might want to return something like:

Code: [Select]
var  that=this,
      jq = $("<span>", {html"O"})
   .click(function(e){ that.do_something(this); })
   .data("dta", {"id":2, "name":"O"})
   .add(
       $("<span>", {html"X"})
       .click(function(e){ that.do_something_else(this); })
       .data("dta", {"id":2, "name":"O"})
   );

return {jquery: jq};

I can't do above passing HTML.