1,105,456 Community Members

Jquery

Member Avatar
vinaysrk
Newbie Poster
3 posts since Oct 2011
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

Inline Code Example Herei have a page defalt.aspx
<body>
<div id="content"></div>
</body>

and i have genereated dynamic div through jquery reference to id "content"
like

#(document).ready(function(){
    var a=$("#content");
    $(a).append("<div class="scrollbar"><%--some content here-----%></div>")
   });

this above jquery work fine and seen in inside the "content" when i run the default.aspx

but i have make a another jquery funtion on another jquery file
where i have define the "scrollbar" funtion

the problem is that the jquery function "scrollbar" is not call in the "content".

any one who can solve the problem......................!

Member Avatar
AleMonteiro
Master Poster
758 posts since Aug 2010
Reputation Points: 115 [?]
Q&As Helped to Solve: 143 [?]
Skill Endorsements: 29 [?]
 
0
 

There's a couple of syntax errors in your code, try like this:

$(function(){
    var $a = $("#content");
    $a.append('<div class="scrollbar"><%--some content here-----%></div>')
});

And I'm assuming that yout scrollbar function uses the class scrollbar to add the functionality. But keep in mind that the function must be called after this append.

Member Avatar
menakshi
Newbie Poster
9 posts since Sep 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

so many errors friends in this jquery

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article