jquery expand rows

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
2/15/2011 4:13:27 AM
Gravatar
Total Posts 8

jquery expand rows

Hi,

I would like to implement an easy jquery table in my mojoportal just like the one that you can find here:

http://www.javascripttoolbox.com/jquery/#expandablerows.

As you can see, it's based on an easy javascript which depends on the conventional jquery library, that is already integrated in mojoportal:  

$(function() {
$('tr.parent')
  .css("cursor","pointer")
  .attr("title","Click to expand/collapse")
  .click(function(){
   $(this).siblings('.child-'+this.id).toggle();
  });
$('tr[@class^=child-]').hide().children('td');
});

Unfortunately it gives me an annoying error when I run it on IE.

I saw the documentation about using custom js scripts (http://www.mojoportal.com/adding-custom-javascript.aspx), so I would like to know if I can use scripts already used in Mojoportal to create a table like the one above without register a new UserControl.

Thanks in advance

 

2/15/2011 12:35:09 PM
Gravatar
Total Posts 18439

Re: jquery expand rows

Hi,

I just updated that document

http://www.mojoportal.com/adding-custom-javascript.aspx

in the latest version of mojoPortal you don't have to use a UserControl nor pre-render events to add scripts that depend on jquery or jqueryui because we load the jquery and jqueryui scripts in the head so your scripts will always come in after them.

As far as IE issues/errors with your own custom scripts, you'll have to figure that out yourself.

Best,

Joe

2/16/2011 3:04:41 AM
Gravatar
Total Posts 8

Re: jquery expand rows

Thank you very much, Joe, for replying so soon.

Now I'm working with the release 2.3.6.0. As you know, can I load jquery scripts in the head without any problem with this version?

Thank you very much for you incredible work!!!!

Ciao
Duccio

2/16/2011 2:16:01 PM
Gravatar
Total Posts 18439

Re: jquery expand rows

We never made a packaged release for .2.3.6.0, so if that is your version you must have got it from source code. If you are working with source code you should work from the repository and update your source code from the repository frequently.

http://www.mojoportal.com/getting-the-code-with-tortoisehg.aspx

In the latest version as long as you put them after <portal:ScriptLoader it should be fine.

Best,

Joe

You must sign in to post in the forums. This thread is closed to new posts.