We're a community of 1076K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,075,991 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Jquery

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......................!

4
Contributors
2
Replies
1 Day
Discussion Span
3 Months Ago
Last Updated
4
Views
vinaysrk
Newbie Poster
3 posts since Oct 2011
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 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.

AleMonteiro
Master Poster
752 posts since Aug 2010
Reputation Points: 129
Solved Threads: 140
Skill Endorsements: 23

so many errors friends in this jquery

menakshi
Newbie Poster
8 posts since Sep 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.5267 seconds using 2.74MB