Change #pa-container to div class
Change #pa-container to div class
Aloha,
First off I would like to say how easy your component has been to work with so far. great job!
My question is regarding what is needed to change the <div id="pa-container"> to <div class="pa-container">. I am needing the ability to embed different polls in articles on a category list view layout in Joomla, and am running into issues with the pa-container being generated and called to as a div ID.
I have tried making edits to the pollsanywhere.js file, specifically to:
However, changing
My jQuery skills are still a little green, so please let me know if I am doing anything wrong here.
Thanks in advance for whatever help you can offer here!
here is an example of the layout I am attempting:
http://www.voteisland.com/newsite/index.php/professional/nfl
Jesse G
Madwire Media
on behalf of John Kuelbs with VoteIsland.com
First off I would like to say how easy your component has been to work with so far. great job!
My question is regarding what is needed to change the <div id="pa-container"> to <div class="pa-container">. I am needing the ability to embed different polls in articles on a category list view layout in Joomla, and am running into issues with the pa-container being generated and called to as a div ID.
I have tried making edits to the pollsanywhere.js file, specifically to:
callback : function(poll) {
if(typeof poll.error !== 'undefined'){
alert(poll.error);
}else{
jQuery("#"+this.options.container_name).append(
jQuery("<div>",{"class":"pa-title"}).html(poll.title),
jQuery("<hr>",{"class":"pa-ruler"}),
jQuery("<div>",{"class":"pa-description"}).html(poll.description),
this.buildAnswers(poll),
this.buildMetadata(poll),
this.buildButtons(poll)
);
if(this.voted || this.checkCookie("cpvote_"+poll.id)){
this.showResult(poll);
}
var website = this.options.url.substr(this.options.url.indexOf("//")+2);
website = website.substr(0, website.length-1);
var website_home = '<a class="pa-credits" href="'+ this.options.url + 'index.php?option=com_communitypolls">Powered by '+website+'</a>';
jQuery("#"+this.options.container_name).append(jQuery("<div>",{"style":"text-align: center"}).html(website_home));
jQuery("#pa-loading").hide();
}
},
However, changing
jQuery("#"+this.options.container_name).append(to
jQuery("."+this.options.container_name).append(as well as
jQuery("#"+this.options.container_name).append(jQuery("<div>",{"style":"text-align: center"}).html(website_home));to
jQuery("."+this.options.container_name).append(jQuery("<div>",{"style":"text-align: center"}).html(website_home));looks like it breaks the poll embedding feature.
My jQuery skills are still a little green, so please let me know if I am doing anything wrong here.
Thanks in advance for whatever help you can offer here!
here is an example of the layout I am attempting:
http://www.voteisland.com/newsite/index.php/professional/nfl
Jesse G
Madwire Media
on behalf of John Kuelbs with VoteIsland.com
Access to viewing replies is restricted.
Showing 10 of 10 replies
You do not have permissions for replying to this topic.