Open antrez770 opened 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?
Hi Now I add to this group, but looking for method How call jQuery function in AngularJS controller?
@antrez770 I copied the contents of the jQuery.js file to the very beginning of custom.js
@cooldudezach and it is working? can You give me any example?
@antrez770 Here is the production copy of my custom.js https://csudh-primo.hosted.exlibrisgroup.com/primo-explore/custom/01CALS_UDH/js/custom.js
@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'}); });
@antrez770 I fixed the link. Do a search in the file for both $(
and jQuery(
@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.
@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)
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?
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.
Sorry I solved it
Hi! How can I join the slack channel :D
hi @antrez770, can i close this issue?
Hi, What is the right way to add custom JS - files to Primo? Is somebody use Accessibility menu / plugin for Primo? Thank You.