Questions tagged [dom7]

Framework7 doesn't use any third party library, even for DOM manipulation. It has its own custom DOM7 - DOM library that utilizes most edge and high-performance methods for DOM manipulation. You don’t need to learn something new, its usage is very simple because it has the same syntax as well known jQuery library with support of the most popular and widely used methods and jQuery-like chaining.

To start use it there is a Dom7 global window function, but we recommend to assign it to some local variable with more handy name, like $$, but not to "$" to prevent conflicts with other libraries like jQuery or Zepto:

//Export DOM7 to local variable to make it easy accessable
var $$ = Dom7;

Usage Example

Just everything you already know:

$$('.something').on('click', function (e) {
    $$(this).addClass('hello').attr('title', 'world').insertAfter('.something-else');
});

Dom7 Documentation Link

12 questions
3
votes
1 answer

Framework7 Domcache is duplicating ajax pages in the DOM - how to solve this issue?

I have a single view with one inline page inside and a couple of ajax pages. To activate the hash navigation I set: domCache: true because I want to use inline pages and ajax pages in combination. I see no reason why this shouldn't be possible. …
Hexodus
  • 12,361
  • 6
  • 53
  • 72
2
votes
2 answers

swiperjs es module build doesn't work in IE11 browser

I am using webpack with babel to transpile modules and after adding swiper npm package to the build, IE11 browser stopped working because dom7 dependency is not transpiled properly. This is pointed out on the swiper's get started page, however it is…
Mr T
  • 839
  • 6
  • 16
1
vote
0 answers

How to validate SmartSelect, Radio and Checboxes in [framework7]

We're having issues with validation on checkboxes, smart selects and radio fields in framework 7 v3 There is only validation examples for text inputs (url, email) link to the docs We tried the same approach from the text inputs in the checkbox and…
LRS
  • 51
  • 1
  • 3
1
vote
2 answers

Cordova JSON.stringify is not a function

Hi I'm trying to create a mobile app using cordova with framework7. The problem is when I try to use JSON.stringfy to turn some object to JSON string, I'm getting JSON.stringify is not a function(I guess framework7 does not support), therefore If…
Yakup Türkan
  • 576
  • 2
  • 6
  • 21
0
votes
1 answer

How to blur on scroll using Dom7?

im having a hard time trying to blur a div on scroll, this is my code so far : i find dom7 very confusing, note that im a beginner , feel free to roast me document.addEventListener("DOMContentLoaded", function () { var pageBg =…
ChrisRD
  • 5
  • 2
0
votes
1 answer

How to use js onclick function with data binding ? [Framework7]

I'm using Framework7 with the cordova social sharing plugin and I’m trying to use it onclick like this : share Also, with my…
Jean R.
  • 476
  • 4
  • 16
  • 44
0
votes
0 answers

Resetting form and input fields

So I am making a simple todo list app with Framework7 and VueJS, but I'm struggling to understand how to reset the input fields.
ariaofsorrow
  • 41
  • 1
  • 2
  • 14
0
votes
1 answer

Callback for Cancel in Framework7 swipeout?

I use framkework7 swipeout to delete products in my app. When i swipe to left or right it remains in that position; than a dialog with cancel and ok is showing. If i press ok > it removes the product on cancel only the dialog is hidding, the product…
Adrian
  • 491
  • 6
  • 23
0
votes
2 answers

When displaying the keyboard on Android, it hides my inputs

I’m having a problem: displaying the keyboard on Android, it hides my inputs making it difficult to fill out the form. Framework front end FrameWork7 working with Apache Cordova Descrição do problema.
0
votes
1 answer

$$.ajax is not a function

i tried framework7 Custom DOM library and i run one of the example $$.ajax({ url: 'somepage.html', statusCode: { 404: function (xhr) { alert('page not found'); } } }) but it return error in the console Uncaught TypeError:…
gymie
  • 1
  • 2
0
votes
1 answer

Dom7 - getJson works but unable to transfer data

I'm working on top of Urban Dictionary api example of Framework7. This is the resulting JSON from the url (edit don't ask me why but it starts with an 'a'): a{ "bills": [ { "id": 8, "name_id": "6", "category_id": 4, …
Rosenberg
  • 2,424
  • 5
  • 33
  • 56
-3
votes
4 answers

Highlight Ajax Response with Javascript

I'm trying to highlight a query inside a text coming from an ajax response, before constructing HTML with it and pasting that into the DOM. Right now I'm using this code snippet: function highlightWords(line, word, htmltag) { var tag = htmltag…
Danmoreng
  • 2,367
  • 1
  • 19
  • 32