A PHP Error was encountered
Severity: Warning
Message: preg_match(): Compilation failed: invalid range in character class at offset 4
Filename: controllers/simple_html_dom.php
Line Number: 1385
Backtrace:
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 1385
Function: preg_match
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 1189
Function: read_tag
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 1083
Function: parse
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 97
Function: load
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/views/pages/questions_view.php
Line: 7
Function: str_get_html
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/views/pages/template.php
Line: 4
Function: view
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/Tutorial.php
Line: 53
Function: view
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/index.php
Line: 315
Function: require_once
A PHP Error was encountered
Severity: Warning
Message: preg_match(): Compilation failed: invalid range in character class at offset 4
Filename: controllers/simple_html_dom.php
Line Number: 1385
Backtrace:
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 1385
Function: preg_match
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 1189
Function: read_tag
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 1083
Function: parse
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 97
Function: load
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/views/pages/questions_view.php
Line: 7
Function: str_get_html
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/views/pages/template.php
Line: 4
Function: view
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/Tutorial.php
Line: 53
Function: view
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/index.php
Line: 315
Function: require_once
A PHP Error was encountered
Severity: Warning
Message: preg_match(): Compilation failed: invalid range in character class at offset 4
Filename: controllers/simple_html_dom.php
Line Number: 1385
Backtrace:
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 1385
Function: preg_match
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 1189
Function: read_tag
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 1083
Function: parse
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 97
Function: load
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/views/pages/questions_view.php
Line: 7
Function: str_get_html
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/views/pages/template.php
Line: 4
Function: view
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/Tutorial.php
Line: 53
Function: view
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/index.php
Line: 315
Function: require_once
A PHP Error was encountered
Severity: Warning
Message: preg_match(): Compilation failed: invalid range in character class at offset 4
Filename: controllers/simple_html_dom.php
Line Number: 1385
Backtrace:
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 1385
Function: preg_match
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 1189
Function: read_tag
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 1083
Function: parse
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 97
Function: load
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/views/pages/questions_view.php
Line: 7
Function: str_get_html
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/views/pages/template.php
Line: 4
Function: view
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/Tutorial.php
Line: 53
Function: view
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/index.php
Line: 315
Function: require_once
A PHP Error was encountered
Severity: Warning
Message: preg_match(): Compilation failed: invalid range in character class at offset 4
Filename: controllers/simple_html_dom.php
Line Number: 1385
Backtrace:
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 1385
Function: preg_match
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 1189
Function: read_tag
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 1083
Function: parse
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 97
Function: load
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/views/pages/questions_view.php
Line: 7
Function: str_get_html
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/views/pages/template.php
Line: 4
Function: view
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/Tutorial.php
Line: 53
Function: view
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/index.php
Line: 315
Function: require_once
A PHP Error was encountered
Severity: Warning
Message: preg_match(): Compilation failed: invalid range in character class at offset 4
Filename: controllers/simple_html_dom.php
Line Number: 1385
Backtrace:
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 1385
Function: preg_match
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 1189
Function: read_tag
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 1083
Function: parse
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 97
Function: load
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/views/pages/questions_view.php
Line: 7
Function: str_get_html
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/views/pages/template.php
Line: 4
Function: view
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/Tutorial.php
Line: 53
Function: view
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/index.php
Line: 315
Function: require_once
A PHP Error was encountered
Severity: Warning
Message: preg_match(): Compilation failed: invalid range in character class at offset 4
Filename: controllers/simple_html_dom.php
Line Number: 1385
Backtrace:
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 1385
Function: preg_match
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 1189
Function: read_tag
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 1083
Function: parse
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 97
Function: load
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/views/pages/questions_view.php
Line: 7
Function: str_get_html
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/views/pages/template.php
Line: 4
Function: view
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/Tutorial.php
Line: 53
Function: view
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/index.php
Line: 315
Function: require_once
A PHP Error was encountered
Severity: Warning
Message: preg_match(): Compilation failed: invalid range in character class at offset 4
Filename: controllers/simple_html_dom.php
Line Number: 1385
Backtrace:
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 1385
Function: preg_match
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 1189
Function: read_tag
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 1083
Function: parse
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 97
Function: load
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/views/pages/questions_view.php
Line: 7
Function: str_get_html
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/views/pages/template.php
Line: 4
Function: view
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/Tutorial.php
Line: 53
Function: view
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/index.php
Line: 315
Function: require_once
A PHP Error was encountered
Severity: Warning
Message: preg_match(): Compilation failed: invalid range in character class at offset 4
Filename: controllers/simple_html_dom.php
Line Number: 1385
Backtrace:
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 1385
Function: preg_match
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 1189
Function: read_tag
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 1083
Function: parse
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 97
Function: load
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/views/pages/questions_view.php
Line: 7
Function: str_get_html
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/views/pages/template.php
Line: 4
Function: view
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/Tutorial.php
Line: 53
Function: view
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/index.php
Line: 315
Function: require_once
A PHP Error was encountered
Severity: Warning
Message: preg_match(): Compilation failed: invalid range in character class at offset 4
Filename: controllers/simple_html_dom.php
Line Number: 1385
Backtrace:
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 1385
Function: preg_match
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 1189
Function: read_tag
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 1083
Function: parse
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 97
Function: load
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/views/pages/questions_view.php
Line: 7
Function: str_get_html
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/views/pages/template.php
Line: 4
Function: view
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/Tutorial.php
Line: 53
Function: view
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/index.php
Line: 315
Function: require_once
A PHP Error was encountered
Severity: Warning
Message: preg_match(): Compilation failed: invalid range in character class at offset 4
Filename: controllers/simple_html_dom.php
Line Number: 1385
Backtrace:
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 1385
Function: preg_match
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 1189
Function: read_tag
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 1083
Function: parse
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 97
Function: load
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/views/pages/questions_view.php
Line: 7
Function: str_get_html
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/views/pages/template.php
Line: 4
Function: view
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/Tutorial.php
Line: 53
Function: view
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/index.php
Line: 315
Function: require_once
A PHP Error was encountered
Severity: Warning
Message: preg_match(): Compilation failed: invalid range in character class at offset 4
Filename: controllers/simple_html_dom.php
Line Number: 1385
Backtrace:
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 1385
Function: preg_match
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 1189
Function: read_tag
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 1083
Function: parse
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 97
Function: load
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/views/pages/questions_view.php
Line: 7
Function: str_get_html
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/views/pages/template.php
Line: 4
Function: view
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/Tutorial.php
Line: 53
Function: view
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/index.php
Line: 315
Function: require_once
A PHP Error was encountered
Severity: Warning
Message: preg_match(): Compilation failed: invalid range in character class at offset 4
Filename: controllers/simple_html_dom.php
Line Number: 1385
Backtrace:
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 1385
Function: preg_match
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 1189
Function: read_tag
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 1083
Function: parse
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 97
Function: load
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/views/pages/questions_view.php
Line: 7
Function: str_get_html
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/views/pages/template.php
Line: 4
Function: view
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/Tutorial.php
Line: 53
Function: view
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/index.php
Line: 315
Function: require_once
A PHP Error was encountered
Severity: Warning
Message: preg_match_all(): Compilation failed: invalid range in character class at offset 4
Filename: controllers/simple_html_dom.php
Line Number: 690
Backtrace:
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 690
Function: preg_match_all
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 508
Function: parse_selector
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 1223
Function: find
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 1086
Function: parse_charset
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 97
Function: load
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/views/pages/questions_view.php
Line: 7
Function: str_get_html
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/views/pages/template.php
Line: 4
Function: view
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/Tutorial.php
Line: 53
Function: view
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/index.php
Line: 315
Function: require_once
A PHP Error was encountered
Severity: Warning
Message: Invalid argument supplied for foreach()
Filename: controllers/simple_html_dom.php
Line Number: 697
Backtrace:
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 697
Function: _error_handler
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 508
Function: parse_selector
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 1223
Function: find
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 1086
Function: parse_charset
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 97
Function: load
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/views/pages/questions_view.php
Line: 7
Function: str_get_html
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/views/pages/template.php
Line: 4
Function: view
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/Tutorial.php
Line: 53
Function: view
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/index.php
Line: 315
Function: require_once
A PHP Error was encountered
Severity: Warning
Message: preg_match_all(): Compilation failed: invalid range in character class at offset 4
Filename: controllers/simple_html_dom.php
Line Number: 690
Backtrace:
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 690
Function: preg_match_all
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 508
Function: parse_selector
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 1129
Function: find
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/views/pages/questions_view.php
Line: 8
Function: find
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/views/pages/template.php
Line: 4
Function: view
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/Tutorial.php
Line: 53
Function: view
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/index.php
Line: 315
Function: require_once
A PHP Error was encountered
Severity: Warning
Message: Invalid argument supplied for foreach()
Filename: controllers/simple_html_dom.php
Line Number: 697
Backtrace:
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 697
Function: _error_handler
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 508
Function: parse_selector
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/simple_html_dom.php
Line: 1129
Function: find
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/views/pages/questions_view.php
Line: 8
Function: find
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/views/pages/template.php
Line: 4
Function: view
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/application/controllers/Tutorial.php
Line: 53
Function: view
File: /home/i8bcism1o3mh/public_html/tutorialsmint.com/index.php
Line: 315
Function: require_once
Click on the Live Demo button to see the output.
Example: In this example, we will get the city data attribute value using data() method.
<html lang="en"> <head> <title>Live Demo: How to get data attribute value using jQuery</title> </head> <body> <div id="data_id" data-city="London">Get data attribute value using jQuery - This div has data-city="London" attribute</div> <br/> <button id="get_data_attr">Get data attribute</button> <script src="https://code.jquery.com/jquery-3.4.1.min.js"></script> <script> $(document).ready(function () { $("#get_data_attr").click(function () { var city = $("#data_id").data("city"); alert("City data attribute value is - " + city); }); }); </script> </body> </html>