malsup / cycle2

2nd gen cycling
899 stars 239 forks source link

problem with wordpress/php #841

Closed GodShin closed 5 years ago

GodShin commented 5 years ago

I tried the basic example from the demo page but the the pictures are just underneath one another. I think I did load the script correctly in the functions.php file:

function my_theme_scripts() { wp_enqueue_script( 'mycycle2', 'http://malsup.github.com/jquery.cycle2.js', array( 'jquery' ) ); } add_action( 'wp_enqueue_scripts', 'my_theme_scripts' );

and in the actual slider I just wrote (it shows as the pictures) Have I made a basic php or wordpress mistake? I cant find any useful information so I would be very grateful for any tips

prbenson commented 5 years ago

Do you have a URL running this live for review?

On Sun, Jun 2, 2019 at 09:56 GodShin notifications@github.com wrote:

I tried the basic example from the demo page but the the pictures are just underneath one another. I think I did load the script correctly in the functions.php file:

function my_theme_scripts() { wp_enqueue_script( 'mycycle2', ' http://malsup.github.com/jquery.cycle2.js', array( 'jquery' ) ); } add_action( 'wp_enqueue_scripts', 'my_theme_scripts' );

and in the actual slider I just wrote (it shows as the pictures) Have I made a basic php or wordpress mistake? I cant find any useful information so I would be very grateful for any tips

https://camo.githubusercontent.com/8a74d9d1182a8cfb6c04a2fb7176f793713f9a41/687474703a2f2f6d616c7375702e6769746875622e696f2f696d616765732f70312e6a7067 https://camo.githubusercontent.com/3025ff5bf1fb7c89dbc8d61848732020b76d26df/687474703a2f2f6d616c7375702e6769746875622e696f2f696d616765732f70322e6a7067 https://camo.githubusercontent.com/184857b9b449caedbc89f8071fed4be6c39f9bbb/687474703a2f2f6d616c7375702e6769746875622e696f2f696d616765732f70332e6a7067 https://camo.githubusercontent.com/ad6c0f7bb06b4857aa37eb01e4a4fea1abb10ec2/687474703a2f2f6d616c7375702e6769746875622e696f2f696d616765732f70342e6a7067

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/malsup/cycle2/issues/841?email_source=notifications&email_token=AARNDXQH7CFRXPJSC33525LPYPNS3A5CNFSM4HSC2HIKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GXEY3KA, or mute the thread https://github.com/notifications/unsubscribe-auth/AARNDXQLFA77S7NRRUM5CU3PYPNS3ANCNFSM4HSC2HIA .

GodShin commented 5 years ago

It's under https://demokratietalk.at/

prbenson commented 5 years ago

I think the browser is blocking the js script because your site is on https. Try changing your code to use this instead:

'https://malsup.github.com/jquery.cycle2.js'

Let me know if that fixes it!

On Sun, Jun 2, 2019 at 11:18 GodShin notifications@github.com wrote:

It's under https://demokratietalk.at/

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/malsup/cycle2/issues/841?email_source=notifications&email_token=AARNDXWA3PKOTQM33AGXXU3PYPXGVA5CNFSM4HSC2HIKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWXZANQ#issuecomment-498044982, or mute the thread https://github.com/notifications/unsubscribe-auth/AARNDXUUAL5V4YDJZBUAZQTPYPXGVANCNFSM4HSC2HIA .

prbenson commented 5 years ago

Or you can use this URL instead:

https://cdnjs.cloudflare.com/ajax/libs/jquery.cycle2/2.1.6/jquery.cycle2.js

On Sun, Jun 2, 2019 at 11:59 AM Paul Benson paulrbenson@gmail.com wrote:

I think the browser is blocking the js script because your site is on https. Try changing your code to use this instead:

'https://malsup.github.com/jquery.cycle2.js'

Let me know if that fixes it!

On Sun, Jun 2, 2019 at 11:18 GodShin notifications@github.com wrote:

It's under https://demokratietalk.at/

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/malsup/cycle2/issues/841?email_source=notifications&email_token=AARNDXWA3PKOTQM33AGXXU3PYPXGVA5CNFSM4HSC2HIKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWXZANQ#issuecomment-498044982, or mute the thread https://github.com/notifications/unsubscribe-auth/AARNDXUUAL5V4YDJZBUAZQTPYPXGVANCNFSM4HSC2HIA .

GodShin commented 5 years ago

Thanks, the second url worked :-) Do you have any idea why the other one (I tried with https) didn't?

Thanks again!

prbenson commented 5 years ago

It is odd as I noticed the same thing and I'm not sure. You can also store the js file on your hosting server.

Hallo aus America! Lass mich wissen, ob ich noch etwas tun kann zu helfen!

On Sun, Jun 2, 2019 at 12:05 GodShin notifications@github.com wrote:

Thanks, the second url worked :-) Do you have any idea why the other one (I tried with https) didn't?

Thanks again!

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/malsup/cycle2/issues/841?email_source=notifications&email_token=AARNDXTL7ZYEZOQFAN5Y2DDPYP4WTA5CNFSM4HSC2HIKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWXZ2WA#issuecomment-498048344, or mute the thread https://github.com/notifications/unsubscribe-auth/AARNDXX6BJFOGVYJUEMRHO3PYP4WTANCNFSM4HSC2HIA .

GodShin commented 5 years ago

Danke, vielleicht stoße ich mal auf die Antwort!

Schöne Grüße aus Österreich! Greetings from Austria!