Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
JScrollpane wont work after ajax
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Edgar Lizcano Sosa  
View profile  
 More options Feb 23 2012, 2:02 pm
From: Edgar Lizcano Sosa <ed...@remedia.com.mx>
Date: Thu, 23 Feb 2012 11:02:32 -0800 (PST)
Local: Thurs, Feb 23 2012 2:02 pm
Subject: JScrollpane wont work after ajax
so after i load some content on my div i wanted to initialize
jscrollpane but it just wont work heres my code see if u guys can tell
me what its wrong

Ajax (jquery)

$("#mision").click(function() {
    var id = this.id;
    $.ajax({
      url: template + "/acciones.php",
      type: "POST",
      data:  "id=" + id,

      complete: function() {

      },

      success: function(x) {
        $("#cargaContenido").html(x).fadeIn();
        $('#cargaContenido').jScrollPane();
     },

      error: function() {
        //called when there is an error
      },
    });

});

it does insert the content but the scrollpane will never appear :/ any
ideas?

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Deepak Bharadwaj  
View profile  
 More options Nov 8 2012, 10:21 am
From: Deepak Bharadwaj <deepak.nag...@gmail.com>
Date: Thu, 8 Nov 2012 07:21:15 -0800 (PST)
Local: Thurs, Nov 8 2012 10:21 am
Subject: Re: JScrollpane wont work after ajax

i need exactly this....did u figure this out Edgar ?....im using this for
datatables.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Edgar Lizcano Sosa  
View profile  
 More options Nov 8 2012, 12:20 pm
From: Edgar Lizcano Sosa <ed...@remedia.com.mx>
Date: Thu, 8 Nov 2012 11:20:46 -0600
Local: Thurs, Nov 8 2012 12:20 pm
Subject: Re: [jscrollpane] Re: JScrollpane wont work after ajax

Yep i did , actually this is what i did to fix this problem.

case 'Objetivos':
  var id = 'objetivos';
$("#content").load(template + '/vision.php',function(){
$("ul li").removeClass('oversubmenu')
$(".objetivos").addClass('oversubmenu');
$("#objetivos").css('color','white !important');
$(".inscripciones").css('color', '#90D3CB');
$(".inicio").css('color', '#90D3CB');
$(".programas").css('color', '#90D3CB');
$(".servicios").css('color', '#90D3CB');
$(".galeria").css('color', '#90D3CB');
$(".noticias").css('color', '#90D3CB');
$(".contacto").css('color', '#90D3CB');
$(".nosotros").css('color', '#FCF8F6');
 $( '.container' ).children().show();
$("#loader").hide();
 $.ajax({
  url: template + "/acciones.php",
  type: "POST",
  data: "id=" + id,
  beforeSend: function(){
  $("ul li.submenu").css("color","#2A99A1");
  },

  complete: function() {
    //called when complete
  },
  success: function(x) {
  $("#cargaContenido").css('display','none');
    $("#cargaContenido").html(x);
    $("#cargaContenido").fadeIn('1000');
     $("#scrollpro").css({'height':(($(window).height())-210)+'px'});
    $('#scrollpro').jScrollPane({
 verticalDragMinHeight: 20,
verticalDragMaxHeight: 20,
horizontalDragMinWidth: 20,
horizontalDragMaxWidth: 20
 });

    $(window).resize(function(){
          $('#scrollpro').css({'height':(($(window).height())-210)+'px'});
          $('#scrollpro').jScrollPane({

           autoReinitialise: true,
           verticalDragMinHeight: 20,
verticalDragMaxHeight: 20,
horizontalDragMinWidth: 20,
horizontalDragMaxWidth: 20

          });
    });

 },
  error: function() {
    //called when there is an error
  },

});

 hoverli()
 });
break;

What i did was instead of using the existent div where i load everything. I
decided to add another one on my ajax  document. Like this.

<div id="scrollpro" style="overflow:auto; width:280px;">
<div id="pruebadiv" style="width:280px">
<P class ="subtitulo">Misi&oacute;n</p>
<p class ="cuerpotexto" style="text-align:justify">Formar a futuros
maquillistas profesionales adaptando sus perfiles a las necesidades de sus
empleadores, expandiendo sus oportunidades de desarrollo personal,
profesional y económico.<br/><br/></p>
 <p class ="cuerpotexto" style="text-align:justify">Logramos la combinación
perfecta entre excelentes técnicas de maquillaje profesional y los más
altos estándares de comportamiento en el ambiente laboral.<br/><br/></p>
 <p class="cuerpotexto" style="text-align:justify">"Somos un centro donde
cualquier persona pueda mejorar su apariencia al aprender la teoría y
práctica básica de la imagen y el maquillaje"<br/><br/></p>
 <p class="cuerpotexto" style="text-align:justify">Nägu crea un espacio de
intercambio entre profesionales, empresas y estudiantes con la más alta
calidad de enseñanza para contribuir al buen desempeño de la industria en
México.</p>
</div>
</div>

Hope it works for you!

On Thu, Nov 8, 2012 at 9:21 AM, Deepak Bharadwaj <deepak.nag...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Edgar Lizcano Sosa  
View profile  
 More options Nov 8 2012, 1:19 pm
From: Edgar Lizcano Sosa <ed...@remedia.com.mx>
Date: Thu, 8 Nov 2012 12:19:45 -0600
Local: Thurs, Nov 8 2012 1:19 pm
Subject: Re: [jscrollpane] Re: JScrollpane wont work after ajax

do you have a link to your website?

On Thu, Nov 8, 2012 at 11:58 AM, Deepak Bharadwaj
<deepak.nag...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »