开发者

jquery .load issue (problems in loaded divs)

开发者 https://www.devze.com 2023-03-29 12:36 出处:网络
when i use this code,the jquery code in the #paylasimlar does not run.i search a lot.some say use .ajax some say do not use bind.load.but none of them works.what can i do if i want codes

when i use this code,the jquery code in the #paylasimlar does not run.i search a lot.some say

use .ajax some say do not use bind.load.but none of them works.what can i do if i want codes

开发者_JAVA百科

run in both places?

$('#paylasimlar').load('profile.php #paylasimlar');

(shortly i submit an information and i want to load the section that these information are shown,and there are comment sections below informations whixh work with jquery)


$.load() requires a callback function, and runs the function when the item gets added to the DOM.

So generally you do:

$('#paylasimlar').load(function(){ 
    do Something
});

is this what you are looking for? If not you may want to look at $.ajax() or $.get()


I have to load one index.php file inside another index file. Include() didn't help me at all but load() did!I have no "do something" as mentioned above. It did at least loaed the second index.php inside the other one, but well not peoperly(the page jumps out)!

My question is that could 'not having "do something"' be the reason?

0

精彩评论

暂无评论...
验证码 换一张
取 消