ExLibrisGroup / primo-explore-devenv

A node.js , gulp based development enviornment for Primo's new UI customizations (css,images,html and javascript)
BSD 3-Clause "New" or "Revised" License
112 stars 83 forks source link

Primo - JS files/Accessibility Menu - plugin #65

Open antrez770 opened 6 years ago

antrez770 commented 6 years ago

Hi, What is the right way to add custom JS - files to Primo? Is somebody use Accessibility menu / plugin for Primo? Thank You.

danmichaelo commented 6 years ago

For general questions, please try the #primodev channel: https://igelu-eluna-siwg.slack.com/channels/primodev

Btw. a link to that channel should be added to the README?

antrez770 commented 6 years ago

Hi Now I add to this group, but looking for method How call jQuery function in AngularJS controller?

cooldudezach commented 6 years ago

@antrez770 I copied the contents of the jQuery.js file to the very beginning of custom.js

antrez770 commented 6 years ago

@cooldudezach and it is working? can You give me any example?

cooldudezach commented 6 years ago

@antrez770 Here is the production copy of my custom.js https://csudh-primo.hosted.exlibrisgroup.com/primo-explore/custom/01CALS_UDH/js/custom.js

antrez770 commented 6 years ago

@cooldudezach How can You implement such code?: $('<div id="tools" style="text-align:right;float:right;"><div id="mylink">Click me</a></div>').insertAfter('body'); $("#mylink").click(function() { $('body').css({'background-color':'red'}); });

cooldudezach commented 6 years ago

@antrez770 I fixed the link. Do a search in the file for both $( and jQuery(

antrez770 commented 6 years ago

@cooldudezach Can You do with Jquery in custom.js something like in my previous example? Or somethink like any change (color, background) by click on link? Because, as I see the Jquery add something before Angular load, and after the page is uloaded, Jquery stay passive.

cooldudezach commented 6 years ago

@antrez770 If you go through the code in the link I posted, there are a couple examples. In fact, our mobile menu is run on jquery.

Try this code: $('<div id="tools" style="text-align:right;position: absolute;bottom: 0px;"><div id="mylink">Click me</a></div>').insertAfter('body'); $("#mylink").click(function() { $('body').css({'background-color':'red'}); }); (I changed some of the css, it works for me)

antrez770 commented 6 years ago

Yes it work thank You. Do You know can I insert this div into body? Is it possible? And did You tried insert "title"/role to any tag in the body?

antrez770 commented 6 years ago

Hi @cooldudezach the solution I insert some changes but it is work. but there is one missing step, I can't reach the

"<div>"

with tab focus also if it has tabindex="1" do You know any solution in this specific case? Thank You.

antrez770 commented 6 years ago

Sorry I solved it

Maluzzz commented 5 years ago

Hi! How can I join the slack channel :D

gilax commented 5 years ago

hi @antrez770, can i close this issue?