Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11571

how to call a java/jquery script passing webpart id to modify webpart css sharepoint 2010

$
0
0

Hi,


having the the same issue link in

http://answers.flyppdevportal.com/categories/sharepoint2010/sharepoint2010customization.aspx?ID=95d7f753-b1ee-4d20-a20f-7370173f6a74


a Web Analytics web part is used , need to hide the site url where

(under http://....)

the suggestion n for the post mentioned was to use the jquery/javascript to hide the tagreted div containg the (under http....)


which excat place for ex. if wp identifier is WPQ10

td#MSOZoneCell_WebPartWPQ10.s4-wpcell-plain table.s4-wpTopTable tbody tr td div#WebPartWPQ10.ms-WPBody div

so just to make easy jquey function to hit the div

function myfunction (id)
{
$('#' + id).parentsUntil("td[id^='MSOZoneCell_']").find('.ms-WPBody > div').css('display', 'none');
}

Now this is working fine when we put the id = WebPartWPQ10

but if I want to call this function from the webpart itself passing the id ("WebPart"+this.Qualifier) so its on the fly apply the needed css change to the precise webpart how it should be done ? can i call the jquery function after adding it js file under _layouts and its already registered in master page ? then how an on which webpart event can call that function passing the qualifier parameter

any ideas ?

thanks


azoozazooz


Viewing all articles
Browse latest Browse all 11571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>