GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Is ghere some issue with Javascript used ina Wordpress theme? (https://gfy.com/showthread.php?t=926068)

Angry Jew Cat - Banned for Life 09-06-2009 08:47 AM

Is ghere some issue with Javascript used ina Wordpress theme?
 
Trying to add in a dhtml popover for an opt-in box and it totally fucks up the whole theme. Drop it into any static page and it works fine. Put it into the wordpress theme and it provides a blank page. is there some issues with javascript in the theme too? i thought javascript issues were restricted to use in posts?

Jdoughs 09-06-2009 08:50 AM

Hard to tell without seeing the site, but NO there is no issues using Java, I've got atleast 2 that run heavy java on all pages.

Libertine 09-06-2009 09:22 AM

It's probably a conflict with some other code in the theme. Simply changing the names of variables and/or divs could solve that.

Angry Jew Cat - Banned for Life 09-06-2009 09:25 AM

Quote:

Originally Posted by Libertine (Post 16284681)
It's probably a conflict with some other code in the theme. Simply changing the names of variables and/or divs could solve that.

i never thought that could be the issue. i'll look it over but i don't think thats it. i just checked and the styles for the form are all added into the div tags.

Angry Jew Cat - Banned for Life 09-06-2009 09:45 AM

anyone see anything that could potentially interfere with wordpress in this?

Code:

<script language="JavaScript1.2">
var ie=document.all
var dom=document.getElementById
var ns4=document.layers
var calunits=document.layers? "" : "px"

var bouncelimit=32 //(must be divisible by 8)
var direction="up"

function initbox(){
if (!dom&&!ie&&!ns4)
return
crossobj=(dom)?document.getElementById("dropin").style : ie? document.all.dropin : document.dropin
scroll_top=(ie)? truebody().scrollTop : window.pageYOffset
crossobj.top=scroll_top-250+calunits
crossobj.visibility=(dom||ie)? "visible" : "show"
dropstart=setInterval("dropin()",50)
}

function dropin(){
scroll_top=(ie)? truebody().scrollTop : window.pageYOffset
if (parseInt(crossobj.top)<100+scroll_top)
crossobj.top=parseInt(crossobj.top)+40+calunits
else{
clearInterval(dropstart)
bouncestart=setInterval("bouncein()",50)
}
}

function bouncein(){
crossobj.top=parseInt(crossobj.top)-bouncelimit+calunits
if (bouncelimit<0)
bouncelimit+=8
bouncelimit=bouncelimit*-1
if (bouncelimit==0){
clearInterval(bouncestart)
}
}

function dismissbox(){
if (window.bouncestart) clearInterval(bouncestart)
crossobj.visibility="hidden"
}

function truebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

window.onload=initbox
</script>


harvey 09-06-2009 08:01 PM

it depends 100% on the scripts the theme (or your plugins) use. Sometimes some scripts conflict with others, the best way to avoid this is to use all jquery, or all scriptaculous or all mootools or whatever. Do a search for jquery noconflict and you'll find a non-conflict version that solves this kind of problems MOST of the times (not always)

bah, don't search anything, just go here

Of course, you could use another theme if the above doesn't solve things.

Another possibility is that you may have CSS styles overriden by some script, check out if you have CSS elements declared twice (in the same or different stylesheets)


All times are GMT -7. The time now is 11:52 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123