Forums / General Questions / how do i get javascript to work in the ez pages?

how do i get javascript to work in the ez pages?

Views: 1,100

Results 1 to 3 of 3
28 Mar 2012, 2:35 AM
#1
warroyo90 avatar

warroyo90

New Zenner

Join Date:
Jan 2012
Posts:
59
Plugin Contributions:
0

how do i get javascript to work in the ez pages?

hi i have read other threads about jquery and javascript in ez pages. I have already put the jscript files in the folder and now I am adding script to my ez pages but the script seems to be changing due to the html editor. how do i prevent this bc it is not allowing my jquery to run.

I am trying to get the tabs on my EZ pages to load in other EZ pages though jquery .load() function. im doing this because I have manufacturers and then sub categories within that manufacturer.

I am using this code in the top of my ez page and it is not working at all...I know the javascript is working becuase when i do an ```
alert("hello");

it works fine however this does not ...


<script type="text/javascript"> $(document).ready(function() { //alert("hello"); $('#tab1').click(function(){ $('#loadhere').load("http://mydomain/index.php/?main_page=page&id=2#jump"); }); $('#tab2').click(function(){ $('#loadhere').load("http://mydomain/index.php/?main_page=page&id=3#jump"); }); }); </script>
28 Mar 2012, 4:14 AM
#3
warroyo90 avatar

warroyo90

New Zenner

Join Date:
Jan 2012
Posts:
59
Plugin Contributions:
0

Re: how do i get javascript to work in the ez pages?

Maybe another way to look at my question ... I am trying to add some ajax tabs into my ez pages

for example:

main
-foo
-foo
-foo

these are all tabs on my main ez page but I do not want to have to reload each time i click a tab and re create them a a couple times. i tried using the .load() function from jquery but it loads the entire website into the div instead of just the ez page content. is there a way to just load the ez page content?