简体   繁体   中英

HTML tags not working when using append in a java script but html code works fine when doing hardcode

I am facing a problem that I am not able to solve since few days.... The problem is that when I hardcode HTML tags with values the page is getting loaded with no issues....but while try to load data dynamically by parsing rss feed and then using append to insert the data in the main tag it's not working.... I tried tracing the output of the java script by using alert fucntioin and the output is the extact html that is required...

My code was working fine until I added

<script src="http://www.google.com/jsapi" type="text/javascript"></script> 
 <script type="text/javascript">google.load("jquery", "1");</script>  

I am also calling jquery 1.10.2 at bottom of the page referring to lots of other js

The code is as below:

<div id="grid">
        <script>
        myFunction('test');
        </script>   

                </div>

Fucntion:

function myFunction(var1) {

        $('html').removeClass('no-js');
    if ($.browser.safari || $.browser.webkit) {
            $('grid').addClass('webkit');
        }

        $('#grid').facebook_wall({
            id: var1,
            access_token: '193673707489176|55a9bc60f1b35074263ea95e45218fc3',
            limit: 1

        });



};
</script>

Please help I am not able to trace it....

函数myFunction()之后不需要半冒号{}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM