Questions tagged [javascript]
126 questions
3
votes
1 answer
Swapping Hogan for other JavaScript template engine in the SearchPlus plugin
For a JavaScript novice like myself, what steps would be involved in swapping out the hogan.js templating framework for something else? I have my eye on Swig, which comes with some 'twig-like' filters I need to utilize when outputting my search…
John Johnson
- 586
- 3
- 13
2
votes
2 answers
javascript module question
Hi hope you can help with this and hoping it's simple. I need to write a javascript module and would like to use the js tag:
{% js %}
//script here
{% endjs %}
This is good because it only gets embedded when needed and it gets placed at…
cannon303
- 309
- 1
- 8
2
votes
1 answer
Minifying bower_components js files
I am currently using spoeken's gulp workflow (https://github.com/spoeken/gulp-craftcms). Everything works well in development, however, when it comes to production, I can't seem to concat/minify my bower_components dependencies, into one file.
I…
Jose
- 103
- 6
2
votes
2 answers
Add listener to dynamic html elements
I have a field type that I need to initialize. When the page loads I can use code like the following to handle certain behaviors of the field:
$('.myfieldwrapper').each(function() {
new Craft.MyField(this);
});
Within the Craft.MyField object, I…
Ben Parizek
- 13,448
- 1
- 33
- 98
1
vote
3 answers
How to use page specific javascript using asset rev plugin and webpack?
I have a similar question here.
But I was NOT able to ask the right question.
I'm practicing with starter-blog template.
How do I use page specific javascript using the asset rev plugin and webpack?
I don't want to manually add the js file inside…
user
- 63
- 5
1
vote
1 answer
How to use page specific javascript using the starter-blog template using asset rev plugin?
I'm practicing with starter-blog template.
How do I include a page specific javascript using the asset rev plugin?
Thanks.
user
- 63
- 5
1
vote
1 answer
Make an Ajax call to plug-in controller
I am trying to send data to my plug-in controller using jquery $.post() method.
here is my form:
Flying Car 0013
- 157
- 7
1
vote
2 answers
Verbb Comments plugin - Can't see comment replies
I recently installed Verbbs Comments plugin on my Craft site, which seems all well and good except that I can't toggle the comment replies. ('2 comments' when clicked does nothing)
Everything else works fine but that. I'm currently using the sample…
Amy
- 407
- 3
- 15
1
vote
1 answer
HTML and Scripts in Entries?
I am building a section in which a client will list their various social network connections. There are fields for each social network's name and icon, as well as a field with the URL to the client's page on the specified network.
I also need a…
Philip Jones
- 476
- 3
- 10